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
|
|
|
|
|
|
|
#![feature(never_type)]
|
|
|
|
|
|
|
|
struct Human;
|
|
|
|
|
|
|
|
fn main() {
|
2018-12-02 11:26:09 +01:00
|
|
|
let _x: ! = unsafe {
|
2018-07-15 11:21:56 +02:00
|
|
|
std::mem::transmute::<Human, !>(Human) //~ ERROR constant evaluation error
|
2018-05-20 15:08:15 +02:00
|
|
|
//^~ NOTE entered unreachable code
|
2018-05-09 17:30:16 +02:00
|
|
|
};
|
|
|
|
}
|