rust/tests/ui/pattern/usefulness/match-non-exhaustive.rs
2023-06-28 01:51:53 -04:00

6 lines
209 B
Rust

fn main() {
match 0 { 1 => () } //~ ERROR non-exhaustive patterns
match 0 { 0 if false => () } //~ ERROR non-exhaustive patterns
//-| NOTE match arms with guards don't count towards exhaustivity
}