You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
warning: borrow of packed field is unsafe and requires unsafe function or block (error E0133)
--> targets\stm32f072-disco\src\main.rs:23:1
|
23 | / #[gen_hid_descriptor(
24 | | (collection = APPLICATION, usage_page = GENERIC_DESKTOP, usage = JOYSTICK) = {
25 | | (usage = X,) = {x=input;};
26 | | (usage = Y,) = {y=input;};
... |
30 | | }
31 | | )]
| |__^
|
= note: `#[warn(safe_packed_borrows)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #46043 <https://github.com/rust-lang/rust/issues/46043>
= note: fields of packed structs might be misaligned: dereferencing a misaligned pointer or even just creating a misaligned reference is undefined behavior
= note: this warning originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
The text was updated successfully, but these errors were encountered:
I'm trying to create a descriptor for a joystick with 10 buttons:
This yields the following warning:
The text was updated successfully, but these errors were encountered: