17 lines
271 B
Rust
17 lines
271 B
Rust
#![feature(never_type)]
|
|
#![allow(unreachable_code)]
|
|
#![allow(unused_variables)]
|
|
|
|
enum Void {}
|
|
|
|
fn f(v: Void) -> ! {
|
|
match v {}
|
|
}
|
|
|
|
fn main() {
|
|
let v: Void = unsafe {
|
|
std::mem::transmute::<(), Void>(()) //~ ERROR entered unreachable code
|
|
};
|
|
f(v);
|
|
}
|