1 error: reference to packed field is unaligned
2 --> $DIR/unaligned_references_external_macro.rs:5:1
4 LL | / unaligned_references_external_crate::mac! {
13 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
14 = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
15 = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
16 = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
17 note: the lint level is defined here
18 --> $DIR/unaligned_references_external_macro.rs:5:1
20 LL | / unaligned_references_external_crate::mac! {
22 LL | | #[repr(packed)]
28 = note: this error originates in the macro `unaligned_references_external_crate::mac` (in Nightly builds, run with -Z macro-backtrace for more info)
30 error: aborting due to previous error
32 Future incompatibility report: Future breakage diagnostic:
33 error: reference to packed field is unaligned
34 --> $DIR/unaligned_references_external_macro.rs:5:1
36 LL | / unaligned_references_external_crate::mac! {
38 LL | | #[repr(packed)]
45 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
46 = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
47 = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
48 = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
49 note: the lint level is defined here
50 --> $DIR/unaligned_references_external_macro.rs:5:1
52 LL | / unaligned_references_external_crate::mac! {
54 LL | | #[repr(packed)]
60 = note: this error originates in the macro `unaligned_references_external_crate::mac` (in Nightly builds, run with -Z macro-backtrace for more info)