mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-30 20:17:50 +00:00
13 lines
260 B
Rust
13 lines
260 B
Rust
enum Foo {
|
|
Bar { bar: bool },
|
|
Other,
|
|
}
|
|
|
|
fn main() {
|
|
let foo = Some(Foo::Other);
|
|
|
|
if let Some(Foo::Bar {_}) = foo {}
|
|
//~^ ERROR expected identifier, found reserved identifier `_`
|
|
//~| ERROR pattern does not mention field `bar` [E0027]
|
|
}
|