rust/tests/ui/pattern/usefulness/issue-39362.rs

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

19 lines
288 B
Rust
Raw Normal View History

2017-05-25 16:36:59 -05: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
//~| patterns
Foo::Bar { bar: Bar::A, .. } => (),
Foo::Bar { bar: Bar::B, .. } => (),
}
}
fn main() {}