@@ -8,27 +8,31 @@ LL | E::S => {}
88 | ^^^^ help: use the tuple variant pattern syntax instead: `E::S(_, _)`
99
1010error[E0023]: this pattern has 1 field, but the corresponding tuple struct has 2 fields
11- --> $DIR/pat-tuple-underfield.rs:9:9
11+ --> $DIR/pat-tuple-underfield.rs:9:10
1212 |
1313LL | struct S(i32, f32);
1414 | ------------------- tuple struct defined here
1515...
1616LL | S(x) => {}
17- | ^^^^ expected 2 fields, found 1
17+ | -^^^ expected 2 fields, found 1
18+ | |
19+ | this tuple struct
1820 |
1921help: use `_` to explicitly ignore each field
2022 |
2123LL | S(x, _) => {}
2224 | +++
2325
2426error[E0023]: this pattern has 1 field, but the corresponding tuple struct has 2 fields
25- --> $DIR/pat-tuple-underfield.rs:14:9
27+ --> $DIR/pat-tuple-underfield.rs:14:10
2628 |
2729LL | struct S(i32, f32);
2830 | ------------------- tuple struct defined here
2931...
3032LL | S(_) => {}
31- | ^^^^ expected 2 fields, found 1
33+ | -^^^ expected 2 fields, found 1
34+ | |
35+ | this tuple struct
3236 |
3337help: use `_` to explicitly ignore each field
3438 |
@@ -40,13 +44,15 @@ LL | S(..) => {}
4044 | ~~
4145
4246error[E0023]: this pattern has 0 fields, but the corresponding tuple struct has 2 fields
43- --> $DIR/pat-tuple-underfield.rs:20:9
47+ --> $DIR/pat-tuple-underfield.rs:20:10
4448 |
4549LL | struct S(i32, f32);
4650 | ------------------- tuple struct defined here
4751...
4852LL | S() => {}
49- | ^^^ expected 2 fields, found 0
53+ | -^^ expected 2 fields, found 0
54+ | |
55+ | this tuple struct
5056 |
5157help: use `_` to explicitly ignore each field
5258 |
@@ -58,27 +64,31 @@ LL | S(..) => {}
5864 | ++
5965
6066error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields
61- --> $DIR/pat-tuple-underfield.rs:27:9
67+ --> $DIR/pat-tuple-underfield.rs:27:13
6268 |
6369LL | S(i32, f32),
6470 | ----------- tuple variant defined here
6571...
6672LL | E::S(x) => {}
67- | ^^^^^^^ expected 2 fields, found 1
73+ | ----^^^ expected 2 fields, found 1
74+ | |
75+ | this tuple variant
6876 |
6977help: use `_` to explicitly ignore each field
7078 |
7179LL | E::S(x, _) => {}
7280 | +++
7381
7482error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields
75- --> $DIR/pat-tuple-underfield.rs:32:9
83+ --> $DIR/pat-tuple-underfield.rs:32:13
7684 |
7785LL | S(i32, f32),
7886 | ----------- tuple variant defined here
7987...
8088LL | E::S(_) => {}
81- | ^^^^^^^ expected 2 fields, found 1
89+ | ----^^^ expected 2 fields, found 1
90+ | |
91+ | this tuple variant
8292 |
8393help: use `_` to explicitly ignore each field
8494 |
@@ -90,13 +100,15 @@ LL | E::S(..) => {}
90100 | ~~
91101
92102error[E0023]: this pattern has 0 fields, but the corresponding tuple variant has 2 fields
93- --> $DIR/pat-tuple-underfield.rs:38:9
103+ --> $DIR/pat-tuple-underfield.rs:38:13
94104 |
95105LL | S(i32, f32),
96106 | ----------- tuple variant defined here
97107...
98108LL | E::S() => {}
99- | ^^^^^^ expected 2 fields, found 0
109+ | ----^^ expected 2 fields, found 0
110+ | |
111+ | this tuple variant
100112 |
101113help: use `_` to explicitly ignore each field
102114 |
@@ -108,13 +120,15 @@ LL | E::S(..) => {}
108120 | ++
109121
110122error[E0023]: this pattern has 2 fields, but the corresponding tuple struct has 4 fields
111- --> $DIR/pat-tuple-underfield.rs:50:9
123+ --> $DIR/pat-tuple-underfield.rs:50:15
112124 |
113125LL | struct Point4(i32, i32, i32, i32);
114126 | ---------------------------------- tuple struct defined here
115127...
116128LL | Point4( a , _ ) => {}
117- | ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 4 fields, found 2
129+ | ------^^^^^^^^^^^^^^^^^^^^ expected 4 fields, found 2
130+ | |
131+ | this tuple struct
118132 |
119133help: use `_` to explicitly ignore each field
120134 |
0 commit comments