11error[E0532]: expected unit struct, unit variant or constant, found tuple variant `E::S`
2- --> $DIR/pat-tuple-underfield.rs:45 :9
2+ --> $DIR/pat-tuple-underfield.rs:41 :9
33 |
44LL | S(i32, f32),
55 | ----------- `E::S` defined here
@@ -14,37 +14,25 @@ LL | struct S(i32, f32);
1414 | ------------------- tuple struct defined here
1515...
1616LL | S(x) => {}
17- | ^^^^ expected 2 fields, found 1
18- |
19- help: use `_` to explicitly ignore each field
20- |
21- LL | S(x, _) => {}
22- | ^^^
23- help: use `..` to ignore the rest of the fields
24- |
25- LL | S(x, ..) => {}
26- | ^^^^
17+ | ^^^-
18+ | | |
19+ | | help: use `_` to explicitly ignore each field
20+ | expected 2 fields, found 1
2721
2822error[E0023]: this pattern has 1 field, but the corresponding tuple struct has 2 fields
29- --> $DIR/pat-tuple-underfield.rs:14 :9
23+ --> $DIR/pat-tuple-underfield.rs:13 :9
3024 |
3125LL | struct S(i32, f32);
3226 | ------------------- tuple struct defined here
3327...
3428LL | S(_) => {}
35- | ^^^^ expected 2 fields, found 1
36- |
37- help: use `_` to explicitly ignore each field
38- |
39- LL | S(_, _) => {}
40- | ^^^
41- help: use `..` to ignore all fields
42- |
43- LL | S(..) => {}
44- | ^^
29+ | ^^^-
30+ | | |
31+ | | help: use `_` to explicitly ignore each field
32+ | expected 2 fields, found 1
4533
4634error[E0023]: this pattern has 0 fields, but the corresponding tuple struct has 2 fields
47- --> $DIR/pat-tuple-underfield.rs:20 :9
35+ --> $DIR/pat-tuple-underfield.rs:18 :9
4836 |
4937LL | struct S(i32, f32);
5038 | ------------------- tuple struct defined here
@@ -62,43 +50,31 @@ LL | S(..) => {}
6250 | ^^
6351
6452error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields
65- --> $DIR/pat-tuple-underfield.rs:27 :9
53+ --> $DIR/pat-tuple-underfield.rs:25 :9
6654 |
6755LL | S(i32, f32),
6856 | ----------- tuple variant defined here
6957...
7058LL | E::S(x) => {}
71- | ^^^^^^^ expected 2 fields, found 1
72- |
73- help: use `_` to explicitly ignore each field
74- |
75- LL | E::S(x, _) => {}
76- | ^^^
77- help: use `..` to ignore the rest of the fields
78- |
79- LL | E::S(x, ..) => {}
80- | ^^^^
59+ | ^^^^^^-
60+ | | |
61+ | | help: use `_` to explicitly ignore each field
62+ | expected 2 fields, found 1
8163
8264error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields
83- --> $DIR/pat-tuple-underfield.rs:33 :9
65+ --> $DIR/pat-tuple-underfield.rs:30 :9
8466 |
8567LL | S(i32, f32),
8668 | ----------- tuple variant defined here
8769...
8870LL | E::S(_) => {}
89- | ^^^^^^^ expected 2 fields, found 1
90- |
91- help: use `_` to explicitly ignore each field
92- |
93- LL | E::S(_, _) => {}
94- | ^^^
95- help: use `..` to ignore all fields
96- |
97- LL | E::S(..) => {}
98- | ^^
71+ | ^^^^^^-
72+ | | |
73+ | | help: use `_` to explicitly ignore each field
74+ | expected 2 fields, found 1
9975
10076error[E0023]: this pattern has 0 fields, but the corresponding tuple variant has 2 fields
101- --> $DIR/pat-tuple-underfield.rs:39 :9
77+ --> $DIR/pat-tuple-underfield.rs:35 :9
10278 |
10379LL | S(i32, f32),
10480 | ----------- tuple variant defined here
0 commit comments