summaryrefslogtreecommitdiffstats
path: root/src/test/ui/pattern/usefulness/issue-39362.rs
blob: ea3c8f88e0b36cf2629da444f7c1af7f4eb07724 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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
        //~| patterns
        Foo::Bar { bar: Bar::A, .. } => (),
        Foo::Bar { bar: Bar::B, .. } => (),
    }
}

fn main() {}