mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-11 16:15:03 +00:00
16 lines
256 B
Rust
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);
|
|
}
|