fork/rust
git clone https://git.julia.blue/fork/rust
4fb7144ed15
1.43.0
1error[E0080]: it is undefined behavior to use this value 2 --> $DIR/ub-uninhabit.rs:15:1 3 | 4LL | const BAD_BAD_BAD: Bar = unsafe { MaybeUninit { uninit: () }.init }; 5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered a value of uninhabited type Bar 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 9error[E0080]: it is undefined behavior to use this value 10 --> $DIR/ub-uninhabit.rs:18:1 11 | 12LL | const BAD_BAD_REF: &Bar = unsafe { mem::transmute(1usize) }; 13 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered a value of uninhabited type Bar at .<deref> 14 | 15 = 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. 16 17error[E0080]: it is undefined behavior to use this value 18 --> $DIR/ub-uninhabit.rs:21:1 19 | 20LL | const BAD_BAD_ARRAY: [Bar; 1] = unsafe { MaybeUninit { uninit: () }.init }; 21 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered a value of uninhabited type Bar at [0] 22 | 23 = 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. 24 25error: aborting due to 3 previous errors 26 27For more information about this error, try `rustc --explain E0080`.