1 error: reference to packed field is unaligned
2 --> $DIR/unaligned_references.rs:22:17
4 LL | let _ = &good.ptr;
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/unaligned_references.rs:1:9
14 LL | #![deny(unaligned_references)]
15 | ^^^^^^^^^^^^^^^^^^^^
17 error: reference to packed field is unaligned
18 --> $DIR/unaligned_references.rs:24:17
20 LL | let _ = &good.data;
23 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
24 = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
25 = 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 = 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)
28 error: reference to packed field is unaligned
29 --> $DIR/unaligned_references.rs:27:17
31 LL | let _ = &good.data as *const _;
34 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
35 = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
36 = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
37 = 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)
39 error: reference to packed field is unaligned
40 --> $DIR/unaligned_references.rs:29:27
42 LL | let _: *const _ = &good.data;
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)
50 error: reference to packed field is unaligned
51 --> $DIR/unaligned_references.rs:32:17
53 LL | let _ = good.data.clone();
56 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
57 = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
58 = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
59 = 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)
61 error: reference to packed field is unaligned
62 --> $DIR/unaligned_references.rs:35:17
64 LL | let _ = &good.data2[0];
67 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
68 = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
69 = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
70 = 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)
72 error: reference to packed field is unaligned
73 --> $DIR/unaligned_references.rs:45:17
75 LL | let _ = &packed2.x;
78 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
79 = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
80 = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
81 = 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)
83 error: reference to packed field is unaligned
84 --> $DIR/unaligned_references.rs:90:20
86 LL | let _ref = &m1.1.a;
89 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
90 = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
91 = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
92 = 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)
94 error: reference to packed field is unaligned
95 --> $DIR/unaligned_references.rs:100:20
97 LL | let _ref = &m2.1.a;
100 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
101 = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
102 = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
103 = 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)
105 error: aborting due to 9 previous errors
107 Future incompatibility report: Future breakage diagnostic:
108 error: reference to packed field is unaligned
109 --> $DIR/unaligned_references.rs:22:17
111 LL | let _ = &good.ptr;
114 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
115 = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
116 = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
117 = 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)
118 note: the lint level is defined here
119 --> $DIR/unaligned_references.rs:1:9
121 LL | #![deny(unaligned_references)]
122 | ^^^^^^^^^^^^^^^^^^^^
124 Future breakage diagnostic:
125 error: reference to packed field is unaligned
126 --> $DIR/unaligned_references.rs:24:17
128 LL | let _ = &good.data;
131 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
132 = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
133 = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
134 = 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)
135 note: the lint level is defined here
136 --> $DIR/unaligned_references.rs:1:9
138 LL | #![deny(unaligned_references)]
139 | ^^^^^^^^^^^^^^^^^^^^
141 Future breakage diagnostic:
142 error: reference to packed field is unaligned
143 --> $DIR/unaligned_references.rs:27:17
145 LL | let _ = &good.data as *const _;
148 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
149 = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
150 = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
151 = 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)
152 note: the lint level is defined here
153 --> $DIR/unaligned_references.rs:1:9
155 LL | #![deny(unaligned_references)]
156 | ^^^^^^^^^^^^^^^^^^^^
158 Future breakage diagnostic:
159 error: reference to packed field is unaligned
160 --> $DIR/unaligned_references.rs:29:27
162 LL | let _: *const _ = &good.data;
165 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
166 = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
167 = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
168 = 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)
169 note: the lint level is defined here
170 --> $DIR/unaligned_references.rs:1:9
172 LL | #![deny(unaligned_references)]
173 | ^^^^^^^^^^^^^^^^^^^^
175 Future breakage diagnostic:
176 error: reference to packed field is unaligned
177 --> $DIR/unaligned_references.rs:32:17
179 LL | let _ = good.data.clone();
182 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
183 = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
184 = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
185 = 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)
186 note: the lint level is defined here
187 --> $DIR/unaligned_references.rs:1:9
189 LL | #![deny(unaligned_references)]
190 | ^^^^^^^^^^^^^^^^^^^^
192 Future breakage diagnostic:
193 error: reference to packed field is unaligned
194 --> $DIR/unaligned_references.rs:35:17
196 LL | let _ = &good.data2[0];
199 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
200 = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
201 = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
202 = 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)
203 note: the lint level is defined here
204 --> $DIR/unaligned_references.rs:1:9
206 LL | #![deny(unaligned_references)]
207 | ^^^^^^^^^^^^^^^^^^^^
209 Future breakage diagnostic:
210 error: reference to packed field is unaligned
211 --> $DIR/unaligned_references.rs:45:17
213 LL | let _ = &packed2.x;
216 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
217 = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
218 = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
219 = 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)
220 note: the lint level is defined here
221 --> $DIR/unaligned_references.rs:1:9
223 LL | #![deny(unaligned_references)]
224 | ^^^^^^^^^^^^^^^^^^^^
226 Future breakage diagnostic:
227 error: reference to packed field is unaligned
228 --> $DIR/unaligned_references.rs:90:20
230 LL | let _ref = &m1.1.a;
233 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
234 = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
235 = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
236 = 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)
237 note: the lint level is defined here
238 --> $DIR/unaligned_references.rs:1:9
240 LL | #![deny(unaligned_references)]
241 | ^^^^^^^^^^^^^^^^^^^^
243 Future breakage diagnostic:
244 error: reference to packed field is unaligned
245 --> $DIR/unaligned_references.rs:100:20
247 LL | let _ref = &m2.1.a;
250 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
251 = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
252 = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
253 = 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)
254 note: the lint level is defined here
255 --> $DIR/unaligned_references.rs:1:9
257 LL | #![deny(unaligned_references)]
258 | ^^^^^^^^^^^^^^^^^^^^