rust/src/test/ui/issues/issue-13727.rs
2018-12-25 21:08:33 -07:00

16 lines
256 B
Rust

#![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);
}