]> git.lizzy.rs Git - rust.git/blob - tests/ui/never_type/never-assign-dead-code.rs
Rollup merge of #107615 - notriddle:notriddle/nbsp, r=GuillaumeGomez
[rust.git] / tests / ui / never_type / never-assign-dead-code.rs
1 // Test that an assignment of type ! makes the rest of the block dead code.
2
3 // check-pass
4
5 #![feature(never_type)]
6 #![warn(unused)]
7
8 fn main() {
9     let x: ! = panic!("aah"); //~ WARN unused
10     drop(x); //~ WARN unreachable
11     //~^ WARN unreachable
12 }