]> git.proxmox.com Git - rustc.git/blame - src/test/ui/pattern/usefulness/match-vec-fixed.rs
New upstream version 1.66.0+dfsg1
[rustc.git] / src / test / ui / pattern / usefulness / match-vec-fixed.rs
CommitLineData
32a655c1 1#![deny(unreachable_patterns)]
c34b1796 2
1a4d82fc 3fn a() {
85aaf69f 4 let v = [1, 2, 3];
1a4d82fc
JJ
5 match v {
6 [_, _, _] => {}
7 [_, _, _] => {} //~ ERROR unreachable pattern
8 }
9 match v {
10 [_, 1, _] => {}
11 [_, 1, _] => {} //~ ERROR unreachable pattern
12 _ => {}
223e47cc
LB
13 }
14}
15
16fn main() {
1a4d82fc 17 a();
223e47cc 18}