rust/tests/ui/structs-enums/struct-enum-ignoring-field-with-underscore.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
183 B
Rust
Raw Normal View History

enum Foo {
Bar { bar: bool },
Other,
}
fn main() {
let foo = Some(Foo::Other);
if let Some(Foo::Bar {_}) = foo {}
2023-01-15 15:31:04 -06:00
//~^ ERROR expected field pattern, found `_`
}