1 error[E0080]: it is undefined behavior to use this value
2 --> $DIR/ub-wide-ptr.rs:37:1
4 LL | const STR_TOO_LONG: &str = unsafe { mem::transmute((&42u8, 999usize)) };
5 | ^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a dangling reference (going beyond the bounds of its allocation)
7 = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
8 = note: the raw bytes of the constant (size: 8, align: 4) {
9 ╾─allocN──╼ e7 03 00 00 │ ╾──╼....
12 error[E0080]: it is undefined behavior to use this value
13 --> $DIR/ub-wide-ptr.rs:39:1
15 LL | const NESTED_STR_MUCH_TOO_LONG: (&str,) = (unsafe { mem::transmute((&42, usize::MAX)) },);
16 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered invalid reference metadata: slice is bigger than largest supported object
18 = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
19 = note: the raw bytes of the constant (size: 8, align: 4) {
20 ╾─allocN─╼ ff ff ff ff │ ╾──╼....
23 error: any use of this value will cause an error
24 --> $DIR/ub-wide-ptr.rs:42:1
26 LL | const STR_LENGTH_PTR: &str = unsafe { mem::transmute((&42u8, &3)) };
27 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
29 = note: `#[deny(const_err)]` on by default
30 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
31 = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
32 = help: this code performed an operation that depends on the underlying bytes representing a pointer
33 = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
35 error: any use of this value will cause an error
36 --> $DIR/ub-wide-ptr.rs:46:1
38 LL | const MY_STR_LENGTH_PTR: &MyStr = unsafe { mem::transmute((&42u8, &3)) };
39 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
41 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
42 = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
43 = help: this code performed an operation that depends on the underlying bytes representing a pointer
44 = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
46 error[E0080]: it is undefined behavior to use this value
47 --> $DIR/ub-wide-ptr.rs:49:1
49 LL | const MY_STR_MUCH_TOO_LONG: &MyStr = unsafe { mem::transmute((&42u8, usize::MAX)) };
50 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered invalid reference metadata: slice is bigger than largest supported object
52 = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
53 = note: the raw bytes of the constant (size: 8, align: 4) {
54 ╾─allocN─╼ ff ff ff ff │ ╾──╼....
57 error[E0080]: it is undefined behavior to use this value
58 --> $DIR/ub-wide-ptr.rs:53:1
60 LL | const STR_NO_INIT: &str = unsafe { mem::transmute::<&[_], _>(&[MaybeUninit::<u8> { uninit: () }]) };
61 | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>: encountered uninitialized data in `str`
63 = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
64 = note: the raw bytes of the constant (size: 8, align: 4) {
65 ╾─allocN─╼ 01 00 00 00 │ ╾──╼....
68 error[E0080]: it is undefined behavior to use this value
69 --> $DIR/ub-wide-ptr.rs:56:1
71 LL | const MYSTR_NO_INIT: &MyStr = unsafe { mem::transmute::<&[_], _>(&[MaybeUninit::<u8> { uninit: () }]) };
72 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>.0: encountered uninitialized data in `str`
74 = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
75 = note: the raw bytes of the constant (size: 8, align: 4) {
76 ╾─allocN─╼ 01 00 00 00 │ ╾──╼....
79 error[E0080]: evaluation of constant value failed
80 --> $DIR/ub-wide-ptr.rs:63:1
82 LL | const SLICE_LENGTH_UNINIT: &[u8] = unsafe {
83 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ using uninitialized data, but this operation requires initialized memory
85 error[E0080]: it is undefined behavior to use this value
86 --> $DIR/ub-wide-ptr.rs:70:1
88 LL | const SLICE_TOO_LONG: &[u8] = unsafe { mem::transmute((&42u8, 999usize)) };
89 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a dangling reference (going beyond the bounds of its allocation)
91 = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
92 = note: the raw bytes of the constant (size: 8, align: 4) {
93 ╾─allocN─╼ e7 03 00 00 │ ╾──╼....
96 error[E0080]: it is undefined behavior to use this value
97 --> $DIR/ub-wide-ptr.rs:73:1
99 LL | const SLICE_TOO_LONG_OVERFLOW: &[u32] = unsafe { mem::transmute((&42u32, isize::MAX)) };
100 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered invalid reference metadata: slice is bigger than largest supported object
102 = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
103 = note: the raw bytes of the constant (size: 8, align: 4) {
104 ╾─allocN─╼ ff ff ff 7f │ ╾──╼....
107 error: any use of this value will cause an error
108 --> $DIR/ub-wide-ptr.rs:76:1
110 LL | const SLICE_LENGTH_PTR: &[u8] = unsafe { mem::transmute((&42u8, &3)) };
111 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
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 #71800 <https://github.com/rust-lang/rust/issues/71800>
115 = help: this code performed an operation that depends on the underlying bytes representing a pointer
116 = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
118 error[E0080]: it is undefined behavior to use this value
119 --> $DIR/ub-wide-ptr.rs:80:1
121 LL | const SLICE_TOO_LONG_BOX: Box<[u8]> = unsafe { mem::transmute((&42u8, 999usize)) };
122 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a dangling box (going beyond the bounds of its allocation)
124 = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
125 = note: the raw bytes of the constant (size: 8, align: 4) {
126 ╾─allocN─╼ e7 03 00 00 │ ╾──╼....
129 error: any use of this value will cause an error
130 --> $DIR/ub-wide-ptr.rs:83:1
132 LL | const SLICE_LENGTH_PTR_BOX: Box<[u8]> = unsafe { mem::transmute((&42u8, &3)) };
133 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
135 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
136 = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
137 = help: this code performed an operation that depends on the underlying bytes representing a pointer
138 = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
140 error[E0080]: it is undefined behavior to use this value
141 --> $DIR/ub-wide-ptr.rs:88:1
143 LL | const SLICE_CONTENT_INVALID: &[bool] = &[unsafe { mem::transmute(3u8) }];
144 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered 0x03, but expected a boolean
146 = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
147 = note: the raw bytes of the constant (size: 4, align: 4) {
151 error: any use of this value will cause an error
152 --> $DIR/ub-wide-ptr.rs:88:40
154 LL | const SLICE_CONTENT_INVALID: &[bool] = &[unsafe { mem::transmute(3u8) }];
155 | ------------------------------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ referenced constant has errors
157 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
158 = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
160 error[E0080]: it is undefined behavior to use this value
161 --> $DIR/ub-wide-ptr.rs:96:1
163 LL | const MYSLICE_PREFIX_BAD: &MySliceBool = &MySlice(unsafe { mem::transmute(3u8) }, [false]);
164 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>.0: encountered 0x03, but expected a boolean
166 = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
167 = note: the raw bytes of the constant (size: 4, align: 4) {
171 error: any use of this value will cause an error
172 --> $DIR/ub-wide-ptr.rs:96:42
174 LL | const MYSLICE_PREFIX_BAD: &MySliceBool = &MySlice(unsafe { mem::transmute(3u8) }, [false]);
175 | -------------------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ referenced constant has errors
177 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
178 = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
180 error[E0080]: it is undefined behavior to use this value
181 --> $DIR/ub-wide-ptr.rs:101:1
183 LL | const MYSLICE_SUFFIX_BAD: &MySliceBool = &MySlice(true, [unsafe { mem::transmute(3u8) }]);
184 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>.1[0]: encountered 0x03, but expected a boolean
186 = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
187 = note: the raw bytes of the constant (size: 4, align: 4) {
191 error: any use of this value will cause an error
192 --> $DIR/ub-wide-ptr.rs:101:42
194 LL | const MYSLICE_SUFFIX_BAD: &MySliceBool = &MySlice(true, [unsafe { mem::transmute(3u8) }]);
195 | -------------------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ referenced constant has errors
197 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
198 = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
200 error[E0080]: evaluation of constant value failed
201 --> $DIR/ub-wide-ptr.rs:110:1
203 LL | const RAW_SLICE_LENGTH_UNINIT: *const [u8] = unsafe {
204 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ using uninitialized data, but this operation requires initialized memory
206 error[E0080]: it is undefined behavior to use this value
207 --> $DIR/ub-wide-ptr.rs:119:1
209 LL | const TRAIT_OBJ_SHORT_VTABLE_1: W<&dyn Trait> = unsafe { mem::transmute(W((&92u8, &3u8))) };
210 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered allocN, but expected a vtable pointer
212 = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
213 = note: the raw bytes of the constant (size: 8, align: 4) {
214 ╾allocN─╼ ╾allocN─╼ │ ╾──╼╾──╼
217 error[E0080]: it is undefined behavior to use this value
218 --> $DIR/ub-wide-ptr.rs:123:1
220 LL | const TRAIT_OBJ_SHORT_VTABLE_2: W<&dyn Trait> = unsafe { mem::transmute(W((&92u8, &3u64))) };
221 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered allocN, but expected a vtable pointer
223 = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
224 = note: the raw bytes of the constant (size: 8, align: 4) {
225 ╾allocN─╼ ╾allocN─╼ │ ╾──╼╾──╼
228 error[E0080]: it is undefined behavior to use this value
229 --> $DIR/ub-wide-ptr.rs:127:1
231 LL | const TRAIT_OBJ_INT_VTABLE: W<&dyn Trait> = unsafe { mem::transmute(W((&92u8, 4usize))) };
232 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered 0x4[noalloc], but expected a vtable pointer
234 = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
235 = note: the raw bytes of the constant (size: 8, align: 4) {
236 ╾allocN─╼ 04 00 00 00 │ ╾──╼....
239 error[E0080]: evaluation of constant value failed
240 --> $DIR/ub-wide-ptr.rs:130:57
242 LL | const TRAIT_OBJ_UNALIGNED_VTABLE: &dyn Trait = unsafe { mem::transmute((&92u8, &[0u8; 128])) };
243 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ using allocN as vtable pointer but it does not point to a vtable
245 error[E0080]: evaluation of constant value failed
246 --> $DIR/ub-wide-ptr.rs:133:57
248 LL | const TRAIT_OBJ_BAD_DROP_FN_NULL: &dyn Trait = unsafe { mem::transmute((&92u8, &[0usize; 8])) };
249 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ using allocN as vtable pointer but it does not point to a vtable
251 error[E0080]: evaluation of constant value failed
252 --> $DIR/ub-wide-ptr.rs:136:56
254 LL | const TRAIT_OBJ_BAD_DROP_FN_INT: &dyn Trait = unsafe { mem::transmute((&92u8, &[1usize; 8])) };
255 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ using allocN as vtable pointer but it does not point to a vtable
257 error[E0080]: it is undefined behavior to use this value
258 --> $DIR/ub-wide-ptr.rs:139:1
260 LL | const TRAIT_OBJ_BAD_DROP_FN_NOT_FN_PTR: W<&dyn Trait> = unsafe { mem::transmute(W((&92u8, &[&42u8; 8]))) };
261 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered allocN, but expected a vtable pointer
263 = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
264 = note: the raw bytes of the constant (size: 8, align: 4) {
265 ╾allocN─╼ ╾allocN─╼ │ ╾──╼╾──╼
268 error[E0080]: it is undefined behavior to use this value
269 --> $DIR/ub-wide-ptr.rs:144:1
271 LL | const TRAIT_OBJ_CONTENT_INVALID: &dyn Trait = unsafe { mem::transmute::<_, &bool>(&3u8) };
272 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>.<dyn-downcast>: encountered 0x03, but expected a boolean
274 = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
275 = note: the raw bytes of the constant (size: 8, align: 4) {
276 ╾allocN─╼ ╾allocN─╼ │ ╾──╼╾──╼
279 error[E0080]: it is undefined behavior to use this value
280 --> $DIR/ub-wide-ptr.rs:149:1
282 LL | const RAW_TRAIT_OBJ_VTABLE_NULL: *const dyn Trait = unsafe { mem::transmute((&92u8, 0usize)) };
283 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered null pointer, but expected a vtable pointer
285 = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
286 = note: the raw bytes of the constant (size: 8, align: 4) {
287 ╾allocN─╼ 00 00 00 00 │ ╾──╼....
290 error[E0080]: it is undefined behavior to use this value
291 --> $DIR/ub-wide-ptr.rs:151:1
293 LL | const RAW_TRAIT_OBJ_VTABLE_INVALID: *const dyn Trait = unsafe { mem::transmute((&92u8, &3u64)) };
294 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered allocN, but expected a vtable pointer
296 = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
297 = note: the raw bytes of the constant (size: 8, align: 4) {
298 ╾allocN─╼ ╾allocN─╼ │ ╾──╼╾──╼
301 error[E0080]: could not evaluate static initializer
302 --> $DIR/ub-wide-ptr.rs:157:5
304 LL | mem::transmute::<_, &dyn Trait>((&92u8, 0usize))
305 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer use: null pointer is a dangling pointer (it has no provenance)
307 error[E0080]: could not evaluate static initializer
308 --> $DIR/ub-wide-ptr.rs:161:5
310 LL | mem::transmute::<_, &dyn Trait>((&92u8, &3u64))
311 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ using allocN as vtable pointer but it does not point to a vtable
313 error: aborting due to 32 previous errors
315 For more information about this error, try `rustc --explain E0080`.
316 Future incompatibility report: Future breakage diagnostic:
317 error: any use of this value will cause an error
318 --> $DIR/ub-wide-ptr.rs:42:1
320 LL | const STR_LENGTH_PTR: &str = unsafe { mem::transmute((&42u8, &3)) };
321 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
323 = note: `#[deny(const_err)]` on by default
324 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
325 = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
326 = help: this code performed an operation that depends on the underlying bytes representing a pointer
327 = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
329 Future breakage diagnostic:
330 error: any use of this value will cause an error
331 --> $DIR/ub-wide-ptr.rs:46:1
333 LL | const MY_STR_LENGTH_PTR: &MyStr = unsafe { mem::transmute((&42u8, &3)) };
334 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
336 = note: `#[deny(const_err)]` on by default
337 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
338 = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
339 = help: this code performed an operation that depends on the underlying bytes representing a pointer
340 = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
342 Future breakage diagnostic:
343 error: any use of this value will cause an error
344 --> $DIR/ub-wide-ptr.rs:76:1
346 LL | const SLICE_LENGTH_PTR: &[u8] = unsafe { mem::transmute((&42u8, &3)) };
347 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
349 = note: `#[deny(const_err)]` on by default
350 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
351 = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
352 = help: this code performed an operation that depends on the underlying bytes representing a pointer
353 = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
355 Future breakage diagnostic:
356 error: any use of this value will cause an error
357 --> $DIR/ub-wide-ptr.rs:83:1
359 LL | const SLICE_LENGTH_PTR_BOX: Box<[u8]> = unsafe { mem::transmute((&42u8, &3)) };
360 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
362 = note: `#[deny(const_err)]` on by default
363 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
364 = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
365 = help: this code performed an operation that depends on the underlying bytes representing a pointer
366 = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
368 Future breakage diagnostic:
369 error: any use of this value will cause an error
370 --> $DIR/ub-wide-ptr.rs:88:40
372 LL | const SLICE_CONTENT_INVALID: &[bool] = &[unsafe { mem::transmute(3u8) }];
373 | ------------------------------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ referenced constant has errors
375 = note: `#[deny(const_err)]` on by default
376 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
377 = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
379 Future breakage diagnostic:
380 error: any use of this value will cause an error
381 --> $DIR/ub-wide-ptr.rs:96:42
383 LL | const MYSLICE_PREFIX_BAD: &MySliceBool = &MySlice(unsafe { mem::transmute(3u8) }, [false]);
384 | -------------------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ referenced constant has errors
386 = note: `#[deny(const_err)]` on by default
387 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
388 = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
390 Future breakage diagnostic:
391 error: any use of this value will cause an error
392 --> $DIR/ub-wide-ptr.rs:101:42
394 LL | const MYSLICE_SUFFIX_BAD: &MySliceBool = &MySlice(true, [unsafe { mem::transmute(3u8) }]);
395 | -------------------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ referenced constant has errors
397 = note: `#[deny(const_err)]` on by default
398 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
399 = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>