mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-31 05:26:23 +03:00
Re-enable never_transmute_humans.rs
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
// This should fail even without validation
|
||||
// ignore-test causes rustc ICE: rust-lang/rust#50570
|
||||
// compile-flags: -Zmir-emit-validate=0
|
||||
|
||||
#![feature(never_type)]
|
||||
@@ -10,7 +9,8 @@
|
||||
|
||||
fn main() {
|
||||
let x: ! = unsafe {
|
||||
std::mem::transmute::<Human, !>(Human) //~ ERROR entered unreachable code
|
||||
std::mem::transmute::<Human, !>(Human) //~ ERROR constant evaluation error [E0080]
|
||||
//^~ NOTE entered unreachable code
|
||||
};
|
||||
f(x)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user