]>
Commit | Line | Data |
---|---|---|
a1dfa0c6 | 1 | error[E0080]: it is undefined behavior to use this value |
cdc7bbd5 | 2 | --> $DIR/ub-uninhabit.rs:15:1 |
8faf50e0 | 3 | | |
74b04a01 XL |
4 | LL | 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 | 10 | error[E0080]: it is undefined behavior to use this value |
cdc7bbd5 | 11 | --> $DIR/ub-uninhabit.rs:18:1 |
0bf4aa26 XL |
12 | | |
13 | LL | 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: 8, align: 8) { |
18 | 01 00 00 00 00 00 00 00 │ ........ | |
19 | } | |
0bf4aa26 | 20 | |
a1dfa0c6 | 21 | error[E0080]: it is undefined behavior to use this value |
cdc7bbd5 | 22 | --> $DIR/ub-uninhabit.rs:21:1 |
0bf4aa26 | 23 | | |
74b04a01 | 24 | LL | 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 | |
30 | error: aborting due to 3 previous errors | |
8faf50e0 XL |
31 | |
32 | For more information about this error, try `rustc --explain E0080`. |