about summary refs log tree commit diff
path: root/tests/ui/pattern/usefulness/issue-39362.rs
blob: 0db3980359c84e8d1b7e89542c3b0492a0cd9de6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
//@ dont-require-annotations: NOTE

enum Foo {
    Bar { bar: Bar, id: usize }
}

enum Bar {
    A, B, C, D, E, F
}

fn test(f: Foo) {
    match f {
        //~^ ERROR non-exhaustive patterns
        //~| NOTE patterns
        Foo::Bar { bar: Bar::A, .. } => (),
        Foo::Bar { bar: Bar::B, .. } => (),
    }
}

fn main() {}