1 #![deny(unreachable_code)] 2 #![allow(dead_code)] 3 4 #![feature(never_type)] 5 foo(x: !) -> bool6fn 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()13fn bar() { 14 match (return) { 15 () => () //~ ERROR unreachable arm 16 } 17 } 18 main()19fn main() { 20 return; 21 match () { //~ ERROR unreachable expression 22 () => (), 23 } 24 } 25