]>
Commit | Line | Data |
---|---|---|
32a655c1 | 1 | #![deny(unreachable_patterns)] |
c34b1796 | 2 | |
1a4d82fc | 3 | fn 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 | ||
16 | fn main() { | |
1a4d82fc | 17 | a(); |
223e47cc | 18 | } |