1 error: reference to packed field is unaligned
2 --> $DIR/unaligned_references.rs:22:17
4 LL | let _ = &good.ptr;
7 note: the lint level is defined here
8 --> $DIR/unaligned_references.rs:1:9
10 LL | #![deny(unaligned_references)]
11 | ^^^^^^^^^^^^^^^^^^^^
12 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
13 = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
14 = 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 error: reference to packed field is unaligned
17 --> $DIR/unaligned_references.rs:24:17
19 LL | let _ = &good.data;
22 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
23 = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
24 = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
26 error: reference to packed field is unaligned
27 --> $DIR/unaligned_references.rs:27:17
29 LL | let _ = &good.data as *const _;
32 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
33 = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
34 = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
36 error: reference to packed field is unaligned
37 --> $DIR/unaligned_references.rs:29:27
39 LL | let _: *const _ = &good.data;
42 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
43 = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
44 = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
46 error: reference to packed field is unaligned
47 --> $DIR/unaligned_references.rs:32:17
49 LL | let _ = good.data.clone();
52 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
53 = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
54 = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
56 error: reference to packed field is unaligned
57 --> $DIR/unaligned_references.rs:35:17
59 LL | let _ = &good.data2[0];
62 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
63 = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
64 = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
66 error: reference to packed field is unaligned
67 --> $DIR/unaligned_references.rs:45:17
69 LL | let _ = &packed2.x;
72 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
73 = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
74 = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
76 error: aborting due to 7 previous errors