]> git.lizzy.rs Git - rust.git/blob - tests/ui/structs-enums/struct-enum-ignoring-field-with-underscore.rs
Rollup merge of #107559 - WaffleLapkin:is_it_2015¿, r=davidtwco
[rust.git] / tests / ui / structs-enums / struct-enum-ignoring-field-with-underscore.rs
1 enum Foo {
2     Bar { bar: bool },
3     Other,
4 }
5
6 fn main() {
7     let foo = Some(Foo::Other);
8
9     if let Some(Foo::Bar {_}) = foo {}
10     //~^ ERROR expected field pattern, found `_`
11 }