]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-eval/ub-wide-ptr.64bit.stderr
Rollup merge of #95530 - notriddle:notriddle/private-kw-prim, r=jsha
[rust.git] / src / test / ui / consts / const-eval / ub-wide-ptr.64bit.stderr
1 error[E0080]: it is undefined behavior to use this value
2   --> $DIR/ub-wide-ptr.rs:38:1
3    |
4 LL | const STR_TOO_LONG: &str = unsafe { mem::transmute((&42u8, 999usize)) };
5    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered a dangling reference (going beyond the bounds of its allocation)
6    |
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: 16, align: 8) {
9                ╾───────allocN────────╼ e7 03 00 00 00 00 00 00 │ ╾──────╼........
10            }
11
12 error[E0080]: it is undefined behavior to use this value
13   --> $DIR/ub-wide-ptr.rs:40:1
14    |
15 LL | const NESTED_STR_MUCH_TOO_LONG: (&str,) = (unsafe { mem::transmute((&42, usize::MAX)) },);
16    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed at .0: encountered invalid reference metadata: slice is bigger than largest supported object
17    |
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: 16, align: 8) {
20                ╾───────allocN───────╼ ff ff ff ff ff ff ff ff │ ╾──────╼........
21            }
22
23 error[E0080]: it is undefined behavior to use this value
24   --> $DIR/ub-wide-ptr.rs:43:1
25    |
26 LL | const STR_LENGTH_PTR: &str = unsafe { mem::transmute((&42u8, &3)) };
27    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered non-integer slice length in wide pointer
28    |
29    = 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.
30    = note: the raw bytes of the constant (size: 16, align: 8) {
31                ╾───────allocN───────╼ ╾───────allocN───────╼ │ ╾──────╼╾──────╼
32            }
33
34 error[E0080]: it is undefined behavior to use this value
35   --> $DIR/ub-wide-ptr.rs:46:1
36    |
37 LL | const MY_STR_LENGTH_PTR: &MyStr = unsafe { mem::transmute((&42u8, &3)) };
38    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered non-integer slice length in wide pointer
39    |
40    = 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.
41    = note: the raw bytes of the constant (size: 16, align: 8) {
42                ╾───────allocN───────╼ ╾───────allocN───────╼ │ ╾──────╼╾──────╼
43            }
44
45 error[E0080]: it is undefined behavior to use this value
46   --> $DIR/ub-wide-ptr.rs:48:1
47    |
48 LL | const MY_STR_MUCH_TOO_LONG: &MyStr = unsafe { mem::transmute((&42u8, usize::MAX)) };
49    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered invalid reference metadata: slice is bigger than largest supported object
50    |
51    = 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.
52    = note: the raw bytes of the constant (size: 16, align: 8) {
53                ╾───────allocN───────╼ ff ff ff ff ff ff ff ff │ ╾──────╼........
54            }
55
56 error[E0080]: it is undefined behavior to use this value
57   --> $DIR/ub-wide-ptr.rs:52:1
58    |
59 LL | const STR_NO_INIT: &str = unsafe { mem::transmute::<&[_], _>(&[MaybeUninit::<u8> { uninit: () }]) };
60    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed at .<deref>: encountered uninitialized data in `str`
61    |
62    = 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.
63    = note: the raw bytes of the constant (size: 16, align: 8) {
64                ╾───────allocN───────╼ 01 00 00 00 00 00 00 00 │ ╾──────╼........
65            }
66
67 error[E0080]: it is undefined behavior to use this value
68   --> $DIR/ub-wide-ptr.rs:55:1
69    |
70 LL | const MYSTR_NO_INIT: &MyStr = unsafe { mem::transmute::<&[_], _>(&[MaybeUninit::<u8> { uninit: () }]) };
71    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed at .<deref>.0: encountered uninitialized data in `str`
72    |
73    = 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.
74    = note: the raw bytes of the constant (size: 16, align: 8) {
75                ╾───────allocN───────╼ 01 00 00 00 00 00 00 00 │ ╾──────╼........
76            }
77
78 error[E0080]: it is undefined behavior to use this value
79   --> $DIR/ub-wide-ptr.rs:62:1
80    |
81 LL | / const SLICE_LENGTH_UNINIT: &[u8] = unsafe {
82 LL | |
83 LL | |     let uninit_len = MaybeUninit::<usize> { uninit: () };
84 LL | |     mem::transmute((42, uninit_len))
85 LL | | };
86    | |__^ type validation failed: encountered uninitialized reference
87    |
88    = 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.
89    = note: the raw bytes of the constant (size: 16, align: 8) {
90                __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ │ ░░░░░░░░░░░░░░░░
91            }
92
93 error[E0080]: it is undefined behavior to use this value
94   --> $DIR/ub-wide-ptr.rs:68:1
95    |
96 LL | const SLICE_TOO_LONG: &[u8] = unsafe { mem::transmute((&42u8, 999usize)) };
97    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered a dangling reference (going beyond the bounds of its allocation)
98    |
99    = 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.
100    = note: the raw bytes of the constant (size: 16, align: 8) {
101                ╾───────allocN───────╼ e7 03 00 00 00 00 00 00 │ ╾──────╼........
102            }
103
104 error[E0080]: it is undefined behavior to use this value
105   --> $DIR/ub-wide-ptr.rs:71:1
106    |
107 LL | const SLICE_TOO_LONG_OVERFLOW: &[u32] = unsafe { mem::transmute((&42u32, isize::MAX)) };
108    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered invalid reference metadata: slice is bigger than largest supported object
109    |
110    = 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.
111    = note: the raw bytes of the constant (size: 16, align: 8) {
112                ╾───────allocN───────╼ ff ff ff ff ff ff ff 7f │ ╾──────╼........
113            }
114
115 error[E0080]: it is undefined behavior to use this value
116   --> $DIR/ub-wide-ptr.rs:74:1
117    |
118 LL | const SLICE_LENGTH_PTR: &[u8] = unsafe { mem::transmute((&42u8, &3)) };
119    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered non-integer slice length in wide pointer
120    |
121    = 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.
122    = note: the raw bytes of the constant (size: 16, align: 8) {
123                ╾───────allocN───────╼ ╾───────allocN───────╼ │ ╾──────╼╾──────╼
124            }
125
126 error[E0080]: it is undefined behavior to use this value
127   --> $DIR/ub-wide-ptr.rs:77:1
128    |
129 LL | const SLICE_TOO_LONG_BOX: Box<[u8]> = unsafe { mem::transmute((&42u8, 999usize)) };
130    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered a dangling box (going beyond the bounds of its allocation)
131    |
132    = 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.
133    = note: the raw bytes of the constant (size: 16, align: 8) {
134                ╾───────allocN───────╼ e7 03 00 00 00 00 00 00 │ ╾──────╼........
135            }
136
137 error[E0080]: it is undefined behavior to use this value
138   --> $DIR/ub-wide-ptr.rs:80:1
139    |
140 LL | const SLICE_LENGTH_PTR_BOX: Box<[u8]> = unsafe { mem::transmute((&42u8, &3)) };
141    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered non-integer slice length in wide pointer
142    |
143    = 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.
144    = note: the raw bytes of the constant (size: 16, align: 8) {
145                ╾───────allocN───────╼ ╾───────allocN───────╼ │ ╾──────╼╾──────╼
146            }
147
148 error[E0080]: it is undefined behavior to use this value
149   --> $DIR/ub-wide-ptr.rs:84:1
150    |
151 LL | const SLICE_CONTENT_INVALID: &[bool] = &[unsafe { mem::transmute(3u8) }];
152    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed at .<deref>[0]: encountered 0x03, but expected a boolean
153    |
154    = 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.
155    = note: the raw bytes of the constant (size: 8, align: 8) {
156                ╾───────allocN───────╼                         │ ╾──────╼
157            }
158
159 error[E0080]: it is undefined behavior to use this value
160   --> $DIR/ub-wide-ptr.rs:90:1
161    |
162 LL | const MYSLICE_PREFIX_BAD: &MySliceBool = &MySlice(unsafe { mem::transmute(3u8) }, [false]);
163    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed at .<deref>.0: encountered 0x03, but expected a boolean
164    |
165    = 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.
166    = note: the raw bytes of the constant (size: 8, align: 8) {
167                ╾──────allocN───────╼                         │ ╾──────╼
168            }
169
170 error[E0080]: it is undefined behavior to use this value
171   --> $DIR/ub-wide-ptr.rs:93:1
172    |
173 LL | const MYSLICE_SUFFIX_BAD: &MySliceBool = &MySlice(true, [unsafe { mem::transmute(3u8) }]);
174    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed at .<deref>.1[0]: encountered 0x03, but expected a boolean
175    |
176    = 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.
177    = note: the raw bytes of the constant (size: 8, align: 8) {
178                ╾──────allocN───────╼                         │ ╾──────╼
179            }
180
181 error[E0080]: it is undefined behavior to use this value
182   --> $DIR/ub-wide-ptr.rs:100:1
183    |
184 LL | / const RAW_SLICE_LENGTH_UNINIT: *const [u8] = unsafe {
185 LL | |
186 LL | |     let uninit_len = MaybeUninit::<usize> { uninit: () };
187 LL | |     mem::transmute((42, uninit_len))
188 LL | | };
189    | |__^ type validation failed: encountered uninitialized raw pointer
190    |
191    = 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.
192    = note: the raw bytes of the constant (size: 16, align: 8) {
193                __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ │ ░░░░░░░░░░░░░░░░
194            }
195
196 error[E0080]: it is undefined behavior to use this value
197   --> $DIR/ub-wide-ptr.rs:108:1
198    |
199 LL | const TRAIT_OBJ_SHORT_VTABLE_1: W<&dyn Trait> = unsafe { mem::transmute(W((&92u8, &3u8))) };
200    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed at .0: encountered too small vtable
201    |
202    = 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.
203    = note: the raw bytes of the constant (size: 16, align: 8) {
204                ╾──────allocN───────╼ ╾──────allocN───────╼ │ ╾──────╼╾──────╼
205            }
206
207 error[E0080]: it is undefined behavior to use this value
208   --> $DIR/ub-wide-ptr.rs:111:1
209    |
210 LL | const TRAIT_OBJ_SHORT_VTABLE_2: W<&dyn Trait> = unsafe { mem::transmute(W((&92u8, &3u64))) };
211    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed at .0: encountered too small vtable
212    |
213    = 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.
214    = note: the raw bytes of the constant (size: 16, align: 8) {
215                ╾──────allocN───────╼ ╾──────allocN───────╼ │ ╾──────╼╾──────╼
216            }
217
218 error[E0080]: it is undefined behavior to use this value
219   --> $DIR/ub-wide-ptr.rs:114:1
220    |
221 LL | const TRAIT_OBJ_INT_VTABLE: W<&dyn Trait> = unsafe { mem::transmute(W((&92u8, 4usize))) };
222    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed at .0: encountered dangling vtable pointer in wide pointer
223    |
224    = 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.
225    = note: the raw bytes of the constant (size: 16, align: 8) {
226                ╾──────allocN───────╼ 04 00 00 00 00 00 00 00 │ ╾──────╼........
227            }
228
229 error[E0080]: it is undefined behavior to use this value
230   --> $DIR/ub-wide-ptr.rs:116:1
231    |
232 LL | const TRAIT_OBJ_UNALIGNED_VTABLE: &dyn Trait = unsafe { mem::transmute((&92u8, &[0u8; 128])) };
233    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered unaligned vtable pointer in wide pointer
234    |
235    = 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.
236    = note: the raw bytes of the constant (size: 16, align: 8) {
237                ╾──────allocN───────╼ ╾──────allocN───────╼ │ ╾──────╼╾──────╼
238            }
239
240 error[E0080]: it is undefined behavior to use this value
241   --> $DIR/ub-wide-ptr.rs:118:1
242    |
243 LL | const TRAIT_OBJ_BAD_DROP_FN_NULL: &dyn Trait = unsafe { mem::transmute((&92u8, &[0usize; 8])) };
244    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered invalid drop function pointer in vtable (not pointing to a function)
245    |
246    = 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.
247    = note: the raw bytes of the constant (size: 16, align: 8) {
248                ╾──────allocN───────╼ ╾──────allocN───────╼ │ ╾──────╼╾──────╼
249            }
250
251 error[E0080]: it is undefined behavior to use this value
252   --> $DIR/ub-wide-ptr.rs:120:1
253    |
254 LL | const TRAIT_OBJ_BAD_DROP_FN_INT: &dyn Trait = unsafe { mem::transmute((&92u8, &[1usize; 8])) };
255    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered invalid drop function pointer in vtable (not pointing to a function)
256    |
257    = 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.
258    = note: the raw bytes of the constant (size: 16, align: 8) {
259                ╾──────allocN───────╼ ╾──────allocN───────╼ │ ╾──────╼╾──────╼
260            }
261
262 error[E0080]: it is undefined behavior to use this value
263   --> $DIR/ub-wide-ptr.rs:122:1
264    |
265 LL | const TRAIT_OBJ_BAD_DROP_FN_NOT_FN_PTR: W<&dyn Trait> = unsafe { mem::transmute(W((&92u8, &[&42u8; 8]))) };
266    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed at .0: encountered invalid drop function pointer in vtable (not pointing to a function)
267    |
268    = 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.
269    = note: the raw bytes of the constant (size: 16, align: 8) {
270                ╾──────allocN───────╼ ╾──────allocN───────╼ │ ╾──────╼╾──────╼
271            }
272
273 error[E0080]: it is undefined behavior to use this value
274   --> $DIR/ub-wide-ptr.rs:126:1
275    |
276 LL | const TRAIT_OBJ_CONTENT_INVALID: &dyn Trait = unsafe { mem::transmute::<_, &bool>(&3u8) };
277    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed at .<deref>.<dyn-downcast>: encountered 0x03, but expected a boolean
278    |
279    = 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.
280    = note: the raw bytes of the constant (size: 16, align: 8) {
281                ╾──────allocN───────╼ ╾──────allocN───────╼ │ ╾──────╼╾──────╼
282            }
283
284 error[E0080]: it is undefined behavior to use this value
285   --> $DIR/ub-wide-ptr.rs:130:1
286    |
287 LL | const RAW_TRAIT_OBJ_VTABLE_NULL: *const dyn Trait = unsafe { mem::transmute((&92u8, 0usize)) };
288    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered dangling vtable pointer in wide pointer
289    |
290    = 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.
291    = note: the raw bytes of the constant (size: 16, align: 8) {
292                ╾──────allocN───────╼ 00 00 00 00 00 00 00 00 │ ╾──────╼........
293            }
294
295 error[E0080]: it is undefined behavior to use this value
296   --> $DIR/ub-wide-ptr.rs:132:1
297    |
298 LL | const RAW_TRAIT_OBJ_VTABLE_INVALID: *const dyn Trait = unsafe { mem::transmute((&92u8, &3u64)) };
299    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered too small vtable
300    |
301    = 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.
302    = note: the raw bytes of the constant (size: 16, align: 8) {
303                ╾──────allocN───────╼ ╾──────allocN───────╼ │ ╾──────╼╾──────╼
304            }
305
306 error[E0080]: could not evaluate static initializer
307   --> $DIR/ub-wide-ptr.rs:138:5
308    |
309 LL |     mem::transmute::<_, &dyn Trait>((&92u8, 0usize))
310    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ memory access failed: null pointer is not a valid pointer
311
312 error[E0080]: could not evaluate static initializer
313   --> $DIR/ub-wide-ptr.rs:142:5
314    |
315 LL |     mem::transmute::<_, &dyn Trait>((&92u8, &3u64))
316    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ memory access failed: allocN has size N, so pointer to 24 bytes starting at offset N is out-of-bounds
317
318 error: aborting due to 29 previous errors
319
320 For more information about this error, try `rustc --explain E0080`.