about summary refs log tree commit diff
path: root/tests/ui/or-patterns/simplification_subtleties.rs
blob: a932bd531e6d87ae5e8c9d4af47b4ffa96325e58 (plain)
1
2
3
4
5
6
7
8
9
10
11
//@ run-pass

#[allow(unreachable_patterns)]
fn main() {
    // Test that we don't naively sort the two `2`s together and confuse the failure paths.
    match (1, true) {
        (1 | 2, false | false) => unreachable!(),
        (2, _) => unreachable!(),
        _ => {}
    }
}