You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
= note: `#[deny(unaligned_references)]` on by default
113
+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
114
+
= note: for more information, see issue #82523 <https://github.com./rust-lang/rust/issues/82523>
115
+
= note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
116
+
= 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)
117
+
118
+
Future breakage diagnostic:
119
+
error: reference to packed field is unaligned
120
+
--> $DIR/issue-53114-safety-checks.rs:29:17
121
+
|
122
+
LL | let (_,) = (&p.b,);
123
+
| ^^^^
124
+
|
125
+
= note: `#[deny(unaligned_references)]` on by default
126
+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
127
+
= note: for more information, see issue #82523 <https://github.com./rust-lang/rust/issues/82523>
128
+
= note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
129
+
= 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)
130
+
131
+
Future breakage diagnostic:
132
+
error: reference to packed field is unaligned
133
+
--> $DIR/issue-53114-safety-checks.rs:39:11
134
+
|
135
+
LL | match &p.b { _ => { } }
136
+
| ^^^^
137
+
|
138
+
= note: `#[deny(unaligned_references)]` on by default
139
+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
140
+
= note: for more information, see issue #82523 <https://github.com./rust-lang/rust/issues/82523>
141
+
= note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
142
+
= 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)
143
+
144
+
Future breakage diagnostic:
145
+
error: reference to packed field is unaligned
146
+
--> $DIR/issue-53114-safety-checks.rs:45:12
147
+
|
148
+
LL | match (&p.b,) { (_,) => { } }
149
+
| ^^^^
150
+
|
151
+
= note: `#[deny(unaligned_references)]` on by default
152
+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
153
+
= note: for more information, see issue #82523 <https://github.com./rust-lang/rust/issues/82523>
154
+
= note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
155
+
= 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)
= note: `#[deny(unaligned_references)]` on by default
24
+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
25
+
= note: for more information, see issue #82523 <https://github.com./rust-lang/rust/issues/82523>
26
+
= note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
27
+
= 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
+
= note: this error originates in the macro `$crate::format_args_nl` (in Nightly builds, run with -Z macro-backtrace for more info)
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
98
+
= note: for more information, see issue #82523 <https://github.com./rust-lang/rust/issues/82523>
99
+
= note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
100
+
= 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)
101
+
102
+
Future breakage diagnostic:
103
+
error: reference to packed field is unaligned
104
+
--> $DIR/unaligned_references.rs:24:17
105
+
|
106
+
LL | let _ = &good.data;
107
+
| ^^^^^^^^^^
108
+
|
109
+
note: the lint level is defined here
110
+
--> $DIR/unaligned_references.rs:1:9
111
+
|
112
+
LL | #![deny(unaligned_references)]
113
+
| ^^^^^^^^^^^^^^^^^^^^
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
+
119
+
Future breakage diagnostic:
120
+
error: reference to packed field is unaligned
121
+
--> $DIR/unaligned_references.rs:27:17
122
+
|
123
+
LL | let _ = &good.data as *const _;
124
+
| ^^^^^^^^^^
125
+
|
126
+
note: the lint level is defined here
127
+
--> $DIR/unaligned_references.rs:1:9
128
+
|
129
+
LL | #![deny(unaligned_references)]
130
+
| ^^^^^^^^^^^^^^^^^^^^
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
+
136
+
Future breakage diagnostic:
137
+
error: reference to packed field is unaligned
138
+
--> $DIR/unaligned_references.rs:29:27
139
+
|
140
+
LL | let _: *const _ = &good.data;
141
+
| ^^^^^^^^^^
142
+
|
143
+
note: the lint level is defined here
144
+
--> $DIR/unaligned_references.rs:1:9
145
+
|
146
+
LL | #![deny(unaligned_references)]
147
+
| ^^^^^^^^^^^^^^^^^^^^
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
+
153
+
Future breakage diagnostic:
154
+
error: reference to packed field is unaligned
155
+
--> $DIR/unaligned_references.rs:32:17
156
+
|
157
+
LL | let _ = good.data.clone();
158
+
| ^^^^^^^^^^^^^^^^^
159
+
|
160
+
note: the lint level is defined here
161
+
--> $DIR/unaligned_references.rs:1:9
162
+
|
163
+
LL | #![deny(unaligned_references)]
164
+
| ^^^^^^^^^^^^^^^^^^^^
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
+
170
+
Future breakage diagnostic:
171
+
error: reference to packed field is unaligned
172
+
--> $DIR/unaligned_references.rs:35:17
173
+
|
174
+
LL | let _ = &good.data2[0];
175
+
| ^^^^^^^^^^^^^^
176
+
|
177
+
note: the lint level is defined here
178
+
--> $DIR/unaligned_references.rs:1:9
179
+
|
180
+
LL | #![deny(unaligned_references)]
181
+
| ^^^^^^^^^^^^^^^^^^^^
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
+
187
+
Future breakage diagnostic:
188
+
error: reference to packed field is unaligned
189
+
--> $DIR/unaligned_references.rs:45:17
190
+
|
191
+
LL | let _ = &packed2.x;
192
+
| ^^^^^^^^^^
193
+
|
194
+
note: the lint level is defined here
195
+
--> $DIR/unaligned_references.rs:1:9
196
+
|
197
+
LL | #![deny(unaligned_references)]
198
+
| ^^^^^^^^^^^^^^^^^^^^
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)
= 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)
60
+
= note: this error originates in the macro `unaligned_references_external_crate::mac` (in Nightly builds, run with -Z macro-backtrace for more info)
0 commit comments