11error[E0530]: match bindings cannot shadow tuple structs
2- --> $DIR/pat-tuple-overfield.rs:43 :9
2+ --> $DIR/pat-tuple-overfield.rs:41 :9
33 |
44LL | struct Z1();
55 | ------------ the tuple struct `Z1` is defined here
@@ -8,7 +8,7 @@ LL | Z1 => {}
88 | ^^ cannot be named the same as a tuple struct
99
1010error[E0532]: expected tuple struct or tuple variant, found unit struct `Z0`
11- --> $DIR/pat-tuple-overfield.rs:38 :9
11+ --> $DIR/pat-tuple-overfield.rs:36 :9
1212 |
1313LL | struct Z0;
1414 | ---------- `Z0` defined here
@@ -28,7 +28,7 @@ LL | Z1() => {}
2828 | ~~
2929
3030error[E0532]: expected tuple struct or tuple variant, found unit struct `Z0`
31- --> $DIR/pat-tuple-overfield.rs:39 :9
31+ --> $DIR/pat-tuple-overfield.rs:37 :9
3232 |
3333LL | struct Z0;
3434 | ---------- `Z0` defined here
@@ -48,7 +48,7 @@ LL | Z1(_) => {}
4848 | ~~
4949
5050error[E0532]: expected tuple struct or tuple variant, found unit struct `Z0`
51- --> $DIR/pat-tuple-overfield.rs:40 :9
51+ --> $DIR/pat-tuple-overfield.rs:38 :9
5252 |
5353LL | struct Z0;
5454 | ---------- `Z0` defined here
@@ -68,7 +68,7 @@ LL | Z1(_, _) => {}
6868 | ~~
6969
7070error[E0532]: expected tuple struct or tuple variant, found unit variant `E1::Z0`
71- --> $DIR/pat-tuple-overfield.rs:50 :9
71+ --> $DIR/pat-tuple-overfield.rs:48 :9
7272 |
7373LL | Z0,
7474 | -- `E1::Z0` defined here
@@ -88,7 +88,7 @@ LL | E1::Z1() => {}
8888 | ~~
8989
9090error[E0532]: expected tuple struct or tuple variant, found unit variant `E1::Z0`
91- --> $DIR/pat-tuple-overfield.rs:51 :9
91+ --> $DIR/pat-tuple-overfield.rs:49 :9
9292 |
9393LL | Z0,
9494 | -- `E1::Z0` defined here
@@ -108,7 +108,7 @@ LL | E1::Z1(_) => {}
108108 | ~~
109109
110110error[E0532]: expected tuple struct or tuple variant, found unit variant `E1::Z0`
111- --> $DIR/pat-tuple-overfield.rs:52 :9
111+ --> $DIR/pat-tuple-overfield.rs:50 :9
112112 |
113113LL | Z0,
114114 | -- `E1::Z0` defined here
@@ -128,7 +128,7 @@ LL | E1::Z1(_, _) => {}
128128 | ~~
129129
130130error[E0532]: expected unit struct, unit variant or constant, found tuple variant `E1::Z1`
131- --> $DIR/pat-tuple-overfield.rs:55 :9
131+ --> $DIR/pat-tuple-overfield.rs:53 :9
132132 |
133133LL | Z0,
134134 | -- similarly named unit variant `Z0` defined here
@@ -148,7 +148,7 @@ LL | E1::Z0 => {}
148148 | ~~
149149
150150error[E0308]: mismatched types
151- --> $DIR/pat-tuple-overfield.rs:21 :9
151+ --> $DIR/pat-tuple-overfield.rs:19 :9
152152 |
153153LL | match (1, 2, 3) {
154154 | --------- this expression has type `({integer}, {integer}, {integer})`
@@ -159,7 +159,7 @@ LL | (1, 2, 3, 4) => {}
159159 found tuple `(_, _, _, _)`
160160
161161error[E0308]: mismatched types
162- --> $DIR/pat-tuple-overfield.rs:22 :9
162+ --> $DIR/pat-tuple-overfield.rs:20 :9
163163 |
164164LL | match (1, 2, 3) {
165165 | --------- this expression has type `({integer}, {integer}, {integer})`
@@ -171,7 +171,7 @@ LL | (1, 2, .., 3, 4) => {}
171171 found tuple `(_, _, _, _)`
172172
173173error[E0023]: this pattern has 4 fields, but the corresponding tuple struct has 3 fields
174- --> $DIR/pat-tuple-overfield.rs:26 :11
174+ --> $DIR/pat-tuple-overfield.rs:24 :11
175175 |
176176LL | struct S(u8, u8, u8);
177177 | -- -- -- tuple struct has 3 fields
@@ -180,7 +180,7 @@ LL | S(1, 2, 3, 4) => {}
180180 | - ^ ^ ^ ^ expected 3 fields, found 4
181181
182182error[E0023]: this pattern has 4 fields, but the corresponding tuple struct has 3 fields
183- --> $DIR/pat-tuple-overfield.rs:28 :11
183+ --> $DIR/pat-tuple-overfield.rs:26 :11
184184 |
185185LL | struct S(u8, u8, u8);
186186 | -- -- -- tuple struct has 3 fields
@@ -189,7 +189,7 @@ LL | S(1, 2, .., 3, 4) => {}
189189 | - ^ ^ ^ ^ expected 3 fields, found 4
190190
191191error[E0023]: this pattern has 6 fields, but the corresponding tuple struct has 5 fields
192- --> $DIR/pat-tuple-overfield.rs:33 :11
192+ --> $DIR/pat-tuple-overfield.rs:31 :11
193193 |
194194LL | struct M(
195195 | - tuple struct defined here
@@ -208,7 +208,7 @@ LL | M(1, 2, 3, 4, 5, 6) => {}
208208 | - ^ ^ ^ ^ ^ ^ expected 5 fields, found 6
209209
210210error[E0023]: this pattern has 1 field, but the corresponding tuple struct has 0 fields
211- --> $DIR/pat-tuple-overfield.rs:45 :12
211+ --> $DIR/pat-tuple-overfield.rs:43 :12
212212 |
213213LL | struct Z1();
214214 | --- tuple struct has 0 fields
@@ -217,7 +217,7 @@ LL | Z1(_) => {}
217217 | -- ^ expected 0 fields, found 1
218218
219219error[E0023]: this pattern has 2 fields, but the corresponding tuple struct has 0 fields
220- --> $DIR/pat-tuple-overfield.rs:46 :12
220+ --> $DIR/pat-tuple-overfield.rs:44 :12
221221 |
222222LL | struct Z1();
223223 | --- tuple struct has 0 fields
@@ -226,7 +226,7 @@ LL | Z1(_, _) => {}
226226 | -- ^ ^ expected 0 fields, found 2
227227
228228error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 0 fields
229- --> $DIR/pat-tuple-overfield.rs:57 :16
229+ --> $DIR/pat-tuple-overfield.rs:55 :16
230230 |
231231LL | Z1(),
232232 | -- tuple variant has 0 fields
@@ -235,7 +235,7 @@ LL | E1::Z1(_) => {}
235235 | ------ ^ expected 0 fields, found 1
236236
237237error[E0023]: this pattern has 2 fields, but the corresponding tuple variant has 0 fields
238- --> $DIR/pat-tuple-overfield.rs:58 :16
238+ --> $DIR/pat-tuple-overfield.rs:56 :16
239239 |
240240LL | Z1(),
241241 | -- tuple variant has 0 fields
0 commit comments