This crate currently triggers a future incompatibility warning with Rust.
In src/lib.rs:13:9, there is the following code:
let y = &x.data.0;
This causes rustc
to issue the following diagnostic, from rust-lang/rust#46043
warning: borrow of packed field is unsafe and requires unsafe function or block (error E0133)
--> src/lib.rs:13:9
|
13 | let y = &x.data.0;
| ^^^^^^^^^
|
= 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
Since this construct is going to become a hard error in the future, we should eliminate occurrences of it.