summaryrefslogtreecommitdiffstats
path: root/tests/ui/pattern/usefulness/issue-2111.rs
blob: d27beaeffd637ae08b6a5bdc415071f4fcfb2bed (plain)
1
2
3
4
5
6
7
8
9
10
11
fn foo(a: Option<usize>, b: Option<usize>) {
    match (a, b) {
        //~^ ERROR: non-exhaustive patterns: `(None, None)` and `(Some(_), Some(_))` not covered
        (Some(a), Some(b)) if a == b => {}
        (Some(_), None) | (None, Some(_)) => {}
    }
}

fn main() {
    foo(None, None);
}