1 #![deny(unreachable_code)]
2 #![allow(dead_code)]
3 
4 #![feature(never_type)]
5 
foo(x: !) -> bool6 fn foo(x: !) -> bool {
7     // Explicit matches on the never type are unwarned.
8     match x {}
9     // But matches in unreachable code are warned.
10     match x {} //~ ERROR unreachable expression
11 }
12 
bar()13 fn bar() {
14     match (return) {
15         () => () //~ ERROR unreachable arm
16     }
17 }
18 
main()19 fn main() {
20     return;
21     match () { //~ ERROR unreachable expression
22         () => (),
23     }
24 }
25