mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-04 04:39:16 +00:00
19 lines
288 B
Rust
19 lines
288 B
Rust
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() {}
|