summaryrefslogtreecommitdiffstats
path: root/tests/ui/structs-enums/struct-enum-ignoring-field-with-underscore.rs
blob: b569993c6143edeff75e58bcf35395ba12bcee61 (plain)
1
2
3
4
5
6
7
8
9
10
11
enum Foo {
    Bar { bar: bool },
    Other,
}

fn main() {
    let foo = Some(Foo::Other);

    if let Some(Foo::Bar {_}) = foo {}
    //~^ ERROR expected field pattern, found `_`
}