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)
15 = 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 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 note: the lint level is defined here
115 --> $DIR/unaligned_references.rs:1:9
117 LL | #![deny(unaligned_references)]
118 | ^^^^^^^^^^^^^^^^^^^^
119 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
120 = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
121 = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
122 = 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)
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 note: the lint level is defined here
132 --> $DIR/unaligned_references.rs:1:9
134 LL | #![deny(unaligned_references)]
135 | ^^^^^^^^^^^^^^^^^^^^
136 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
137 = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
138 = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
139 = 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)
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 note: the lint level is defined here
149 --> $DIR/unaligned_references.rs:1:9
151 LL | #![deny(unaligned_references)]
152 | ^^^^^^^^^^^^^^^^^^^^
153 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
154 = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
155 = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
156 = 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)
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 note: the lint level is defined here
166 --> $DIR/unaligned_references.rs:1:9
168 LL | #![deny(unaligned_references)]
169 | ^^^^^^^^^^^^^^^^^^^^
170 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
171 = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
172 = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
173 = 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)
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 note: the lint level is defined here
183 --> $DIR/unaligned_references.rs:1:9
185 LL | #![deny(unaligned_references)]
186 | ^^^^^^^^^^^^^^^^^^^^
187 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
188 = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
189 = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
190 = 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)
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 note: the lint level is defined here
200 --> $DIR/unaligned_references.rs:1:9
202 LL | #![deny(unaligned_references)]
203 | ^^^^^^^^^^^^^^^^^^^^
204 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
205 = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
206 = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
207 = 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)
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 note: the lint level is defined here
217 --> $DIR/unaligned_references.rs:1:9
219 LL | #![deny(unaligned_references)]
220 | ^^^^^^^^^^^^^^^^^^^^
221 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
222 = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
223 = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
224 = 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)
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 note: the lint level is defined here
234 --> $DIR/unaligned_references.rs:1:9
236 LL | #![deny(unaligned_references)]
237 | ^^^^^^^^^^^^^^^^^^^^
238 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
239 = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
240 = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
241 = 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)
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 note: the lint level is defined here
251 --> $DIR/unaligned_references.rs:1:9
253 LL | #![deny(unaligned_references)]
254 | ^^^^^^^^^^^^^^^^^^^^
255 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
256 = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
257 = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
258 = 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)