2018-05-09 10:30:16 -05:00
|
|
|
// This should fail even without validation
|
2018-10-24 10:17:44 -05:00
|
|
|
// compile-flags: -Zmiri-disable-validation
|
2018-05-09 10:30:16 -05:00
|
|
|
|
2019-12-15 05:22:09 -06:00
|
|
|
#![feature(never_type)]
|
|
|
|
|
2018-05-09 10:30:16 -05:00
|
|
|
struct Human;
|
|
|
|
|
|
|
|
fn main() {
|
2018-12-02 04:26:09 -06:00
|
|
|
let _x: ! = unsafe {
|
2020-03-14 03:27:35 -05:00
|
|
|
std::mem::transmute::<Human, !>(Human) //~ ERROR transmuting to uninhabited
|
2018-05-09 10:30:16 -05:00
|
|
|
};
|
|
|
|
}
|