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