1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#![allow(overflowing_literals)] #![deny(unreachable_patterns)] fn test(val: u8) { match val { 256 => print!("0b1110\n"), 512 => print!("0b1111\n"), //~^ ERROR: unreachable pattern _ => print!("fail\n"), } } fn main() { test(1); }