mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-02 10:18:25 +00:00
21 lines
329 B
Rust
21 lines
329 B
Rust
//@ dont-require-annotations: NOTE
|
|
|
|
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
|
|
//~| NOTE patterns
|
|
Foo::Bar { bar: Bar::A, .. } => (),
|
|
Foo::Bar { bar: Bar::B, .. } => (),
|
|
}
|
|
}
|
|
|
|
fn main() {}
|