1 warning: reference to packed field is unaligned
2 --> $DIR/packed-struct-borrow-element-64bit.rs:15:15
4 LL | let brw = &foo.baz;
7 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
8 = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
9 = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
10 = 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)
11 note: the lint level is defined here
12 --> $DIR/packed-struct-borrow-element-64bit.rs:12:8
14 LL | #[warn(unaligned_references)]
15 | ^^^^^^^^^^^^^^^^^^^^
17 warning: 1 warning emitted
19 Future incompatibility report: Future breakage diagnostic:
20 warning: reference to packed field is unaligned
21 --> $DIR/packed-struct-borrow-element-64bit.rs:15:15
23 LL | let brw = &foo.baz;
26 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
27 = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
28 = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
29 = 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)
30 note: the lint level is defined here
31 --> $DIR/packed-struct-borrow-element-64bit.rs:12:8
33 LL | #[warn(unaligned_references)]
34 | ^^^^^^^^^^^^^^^^^^^^