rust/tests/ui/pattern/usefulness/match-non-exhaustive.rs

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

6 lines
209 B
Rust
Raw Normal View History

fn main() {
2015-01-31 16:23:42 +00:00
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
}