rust/tests/ui/pattern/usefulness/match-vec-fixed.rs

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

19 lines
302 B
Rust
Raw Normal View History

#![deny(unreachable_patterns)]
fn a() {
2015-01-31 10:23:42 -06:00
let v = [1, 2, 3];
match v {
[_, _, _] => {}
[_, _, _] => {} //~ ERROR unreachable pattern
}
match v {
[_, 1, _] => {}
[_, 1, _] => {} //~ ERROR unreachable pattern
_ => {}
}
}
fn main() {
a();
}