@@ -170,3 +170,45 @@ LL | unsafe { match static_cross_crate::OPT_ZERO { Some(ref u) => u, None =>
170
170
error: aborting due to 10 previous errors; 3 warnings emitted
171
171
172
172
For more information about this error, try `rustc --explain E0080`.
173
+ Future incompatibility report: Future breakage diagnostic:
174
+ warning: any use of this value will cause an error
175
+ --> $DIR/const_refers_to_static_cross_crate.rs:25:15
176
+ |
177
+ LL | / const U8_MUT2: &u8 = {
178
+ LL | | unsafe { &(*static_cross_crate::ZERO_REF)[0] }
179
+ | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constant accesses static
180
+ LL | |
181
+ LL | |
182
+ LL | |
183
+ LL | | };
184
+ | |__-
185
+ |
186
+ note: the lint level is defined here
187
+ --> $DIR/const_refers_to_static_cross_crate.rs:23:8
188
+ |
189
+ LL | #[warn(const_err)]
190
+ | ^^^^^^^^^
191
+ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
192
+ = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
193
+
194
+ Future breakage diagnostic:
195
+ warning: any use of this value will cause an error
196
+ --> $DIR/const_refers_to_static_cross_crate.rs:32:20
197
+ |
198
+ LL | / const U8_MUT3: &u8 = {
199
+ LL | | unsafe { match static_cross_crate::OPT_ZERO { Some(ref u) => u, None => panic!() } }
200
+ | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constant accesses static
201
+ LL | |
202
+ LL | |
203
+ LL | |
204
+ LL | | };
205
+ | |__-
206
+ |
207
+ note: the lint level is defined here
208
+ --> $DIR/const_refers_to_static_cross_crate.rs:30:8
209
+ |
210
+ LL | #[warn(const_err)]
211
+ | ^^^^^^^^^
212
+ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
213
+ = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
214
+
0 commit comments