summaryrefslogtreecommitdiffstats
path: root/tests/ui/pattern/usefulness/issue-13727.rs
blob: 7fb565ef3bf331f207afe0dfd833c5d7e6cd570b (plain)
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);
}