about summary refs log tree commit diff
path: root/src/test/ui/never-assign-dead-code.rs
blob: fd5fbc30611a9181d6bf376125d5c53df734ddd4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// Test that an assignment of type ! makes the rest of the block dead code.

#![feature(never_type)]
// build-pass (FIXME(62277): could be check-pass?)
#![warn(unused)]


fn main() {
    let x: ! = panic!("aah"); //~ WARN unused
    drop(x); //~ WARN unreachable
    //~^ WARN unreachable
}