2025-04-05 19:19:56 +03:00
|
|
|
//@ dont-require-annotations: NOTE
|
|
|
|
|
|
2017-05-25 17:36:59 -04:00
|
|
|
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
|
2025-04-05 19:19:56 +03:00
|
|
|
//~| NOTE patterns
|
2017-05-25 17:36:59 -04:00
|
|
|
Foo::Bar { bar: Bar::A, .. } => (),
|
|
|
|
|
Foo::Bar { bar: Bar::B, .. } => (),
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main() {}
|