]> git.proxmox.com Git - rustc.git/blame - src/test/ui/consts/const-eval/ub-uninhabit.32bit.stderr
New upstream version 1.63.0+dfsg1
[rustc.git] / src / test / ui / consts / const-eval / ub-uninhabit.32bit.stderr
CommitLineData
a1dfa0c6 1error[E0080]: it is undefined behavior to use this value
cdc7bbd5 2 --> $DIR/ub-uninhabit.rs:15:1
8faf50e0 3 |
74b04a01
XL
4LL | const BAD_BAD_BAD: Bar = unsafe { MaybeUninit { uninit: () }.init };
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered a value of uninhabited type Bar
8faf50e0 6 |
e1599b0c 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.
cdc7bbd5 8 = note: the raw bytes of the constant (size: 0, align: 1) {}
8faf50e0 9
a1dfa0c6 10error[E0080]: it is undefined behavior to use this value
cdc7bbd5 11 --> $DIR/ub-uninhabit.rs:18:1
0bf4aa26
XL
12 |
13LL | const BAD_BAD_REF: &Bar = unsafe { mem::transmute(1usize) };
923072b8 14 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered a reference pointing to uninhabited type Bar
0bf4aa26 15 |
e1599b0c 16 = 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.
cdc7bbd5
XL
17 = note: the raw bytes of the constant (size: 4, align: 4) {
18 01 00 00 00 │ ....
19 }
0bf4aa26 20
a1dfa0c6 21error[E0080]: it is undefined behavior to use this value
cdc7bbd5 22 --> $DIR/ub-uninhabit.rs:21:1
0bf4aa26 23 |
74b04a01 24LL | const BAD_BAD_ARRAY: [Bar; 1] = unsafe { MaybeUninit { uninit: () }.init };
136023e0 25 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed at [0]: encountered a value of uninhabited type Bar
0bf4aa26 26 |
e1599b0c 27 = 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.
cdc7bbd5 28 = note: the raw bytes of the constant (size: 0, align: 1) {}
0bf4aa26
XL
29
30error: aborting due to 3 previous errors
8faf50e0
XL
31
32For more information about this error, try `rustc --explain E0080`.