rust/src/test/ui/pattern/usefulness/issue-56379.rs

15 lines
246 B
Rust
Raw Normal View History

2020-12-16 18:42:49 -06:00
enum Foo {
A(bool),
B(bool),
C(bool),
}
fn main() {
match Foo::A(true) {
//~^ ERROR non-exhaustive patterns: `A(false)` not covered
Foo::A(true) => {}
Foo::B(true) => {}
Foo::C(true) => {}
}
}