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