]> git.proxmox.com Git - rustc.git/blame - src/test/ui/pattern/usefulness/issue-35609.rs
Update unsuspicious file list
[rustc.git] / src / test / ui / pattern / usefulness / issue-35609.rs
CommitLineData
c30ab7b3
SL
1enum Enum {
2 A, B, C, D, E, F
3}
4use Enum::*;
5
6struct S(Enum, ());
7struct Sd { x: Enum, y: () }
8
9fn main() {
ff7c6d11 10 match (A, ()) { //~ ERROR non-exhaustive
c30ab7b3
SL
11 (A, _) => {}
12 }
13
ff7c6d11 14 match (A, A) { //~ ERROR non-exhaustive
c30ab7b3
SL
15 (_, A) => {}
16 }
17
ff7c6d11 18 match ((A, ()), ()) { //~ ERROR non-exhaustive
c30ab7b3
SL
19 ((A, ()), _) => {}
20 }
21
ff7c6d11 22 match ((A, ()), A) { //~ ERROR non-exhaustive
c30ab7b3
SL
23 ((A, ()), _) => {}
24 }
25
ff7c6d11 26 match ((A, ()), ()) { //~ ERROR non-exhaustive
c30ab7b3
SL
27 ((A, _), _) => {}
28 }
29
30
ff7c6d11 31 match S(A, ()) { //~ ERROR non-exhaustive
c30ab7b3
SL
32 S(A, _) => {}
33 }
34
ff7c6d11 35 match (Sd { x: A, y: () }) { //~ ERROR non-exhaustive
c30ab7b3
SL
36 Sd { x: A, y: _ } => {}
37 }
38
ff7c6d11 39 match Some(A) { //~ ERROR non-exhaustive
c30ab7b3
SL
40 Some(A) => (),
41 None => ()
42 }
43}