rust/src/test/ui/never-assign-dead-code.rs
2018-12-25 21:08:33 -07:00

13 lines
256 B
Rust

// Test that an assignment of type ! makes the rest of the block dead code.
#![feature(never_type)]
// compile-pass
#![warn(unused)]
fn main() {
let x: ! = panic!("aah"); //~ WARN unused
drop(x); //~ WARN unreachable
//~^ WARN unreachable
}