1 Future incompatibility report: Future breakage diagnostic:
2 warning: reference to packed field is unaligned
3 --> $DIR/issue-27060-rpass.rs:15:13
5 LL | let _ = &good.data; // ok
8 note: the lint level is defined here
9 --> $DIR/issue-27060-rpass.rs:11:9
11 LL | #[allow(unaligned_references)]
12 | ^^^^^^^^^^^^^^^^^^^^
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)
18 Future breakage diagnostic:
19 warning: reference to packed field is unaligned
20 --> $DIR/issue-27060-rpass.rs:16:13
22 LL | let _ = &good.data2[0]; // ok
25 note: the lint level is defined here
26 --> $DIR/issue-27060-rpass.rs:11:9
28 LL | #[allow(unaligned_references)]
29 | ^^^^^^^^^^^^^^^^^^^^
30 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
31 = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
32 = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
33 = 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)
35 Future breakage diagnostic:
36 warning: reference to packed field is unaligned
37 --> $DIR/issue-27060-rpass.rs:18:13
39 LL | let _ = &good.data;
42 note: the lint level is defined here
43 --> $DIR/issue-27060-rpass.rs:11:9
45 LL | #[allow(unaligned_references)]
46 | ^^^^^^^^^^^^^^^^^^^^
47 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
48 = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
49 = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
50 = 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)
52 Future breakage diagnostic:
53 warning: reference to packed field is unaligned
54 --> $DIR/issue-27060-rpass.rs:19:13
56 LL | let _ = &good.data2[0];
59 note: the lint level is defined here
60 --> $DIR/issue-27060-rpass.rs:11:9
62 LL | #[allow(unaligned_references)]
63 | ^^^^^^^^^^^^^^^^^^^^
64 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
65 = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
66 = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
67 = 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)