1
1
error[E0530]: match bindings cannot shadow tuple structs
2
- --> $DIR/pat-tuple-overfield.rs:43 :9
2
+ --> $DIR/pat-tuple-overfield.rs:41 :9
3
3
|
4
4
LL | struct Z1();
5
5
| ------------ the tuple struct `Z1` is defined here
@@ -8,7 +8,7 @@ LL | Z1 => {}
8
8
| ^^ cannot be named the same as a tuple struct
9
9
10
10
error[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
12
12
|
13
13
LL | struct Z0;
14
14
| ---------- `Z0` defined here
@@ -28,7 +28,7 @@ LL | Z1() => {}
28
28
| ~~
29
29
30
30
error[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
32
32
|
33
33
LL | struct Z0;
34
34
| ---------- `Z0` defined here
@@ -48,7 +48,7 @@ LL | Z1(_) => {}
48
48
| ~~
49
49
50
50
error[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
52
52
|
53
53
LL | struct Z0;
54
54
| ---------- `Z0` defined here
@@ -68,7 +68,7 @@ LL | Z1(_, _) => {}
68
68
| ~~
69
69
70
70
error[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
72
72
|
73
73
LL | Z0,
74
74
| -- `E1::Z0` defined here
@@ -88,7 +88,7 @@ LL | E1::Z1() => {}
88
88
| ~~
89
89
90
90
error[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
92
92
|
93
93
LL | Z0,
94
94
| -- `E1::Z0` defined here
@@ -108,7 +108,7 @@ LL | E1::Z1(_) => {}
108
108
| ~~
109
109
110
110
error[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
112
112
|
113
113
LL | Z0,
114
114
| -- `E1::Z0` defined here
@@ -128,7 +128,7 @@ LL | E1::Z1(_, _) => {}
128
128
| ~~
129
129
130
130
error[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
132
132
|
133
133
LL | Z0,
134
134
| -- similarly named unit variant `Z0` defined here
@@ -148,7 +148,7 @@ LL | E1::Z0 => {}
148
148
| ~~
149
149
150
150
error[E0308]: mismatched types
151
- --> $DIR/pat-tuple-overfield.rs:21 :9
151
+ --> $DIR/pat-tuple-overfield.rs:19 :9
152
152
|
153
153
LL | match (1, 2, 3) {
154
154
| --------- this expression has type `({integer}, {integer}, {integer})`
@@ -159,7 +159,7 @@ LL | (1, 2, 3, 4) => {}
159
159
found tuple `(_, _, _, _)`
160
160
161
161
error[E0308]: mismatched types
162
- --> $DIR/pat-tuple-overfield.rs:22 :9
162
+ --> $DIR/pat-tuple-overfield.rs:20 :9
163
163
|
164
164
LL | match (1, 2, 3) {
165
165
| --------- this expression has type `({integer}, {integer}, {integer})`
@@ -171,7 +171,7 @@ LL | (1, 2, .., 3, 4) => {}
171
171
found tuple `(_, _, _, _)`
172
172
173
173
error[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
175
175
|
176
176
LL | struct S(u8, u8, u8);
177
177
| -- -- -- tuple struct has 3 fields
@@ -180,7 +180,7 @@ LL | S(1, 2, 3, 4) => {}
180
180
| - ^ ^ ^ ^ expected 3 fields, found 4
181
181
182
182
error[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
184
184
|
185
185
LL | struct S(u8, u8, u8);
186
186
| -- -- -- tuple struct has 3 fields
@@ -189,7 +189,7 @@ LL | S(1, 2, .., 3, 4) => {}
189
189
| - ^ ^ ^ ^ expected 3 fields, found 4
190
190
191
191
error[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
193
193
|
194
194
LL | struct M(
195
195
| - tuple struct defined here
@@ -208,7 +208,7 @@ LL | M(1, 2, 3, 4, 5, 6) => {}
208
208
| - ^ ^ ^ ^ ^ ^ expected 5 fields, found 6
209
209
210
210
error[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
212
212
|
213
213
LL | struct Z1();
214
214
| --- tuple struct has 0 fields
@@ -217,7 +217,7 @@ LL | Z1(_) => {}
217
217
| -- ^ expected 0 fields, found 1
218
218
219
219
error[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
221
221
|
222
222
LL | struct Z1();
223
223
| --- tuple struct has 0 fields
@@ -226,7 +226,7 @@ LL | Z1(_, _) => {}
226
226
| -- ^ ^ expected 0 fields, found 2
227
227
228
228
error[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
230
230
|
231
231
LL | Z1(),
232
232
| -- tuple variant has 0 fields
@@ -235,7 +235,7 @@ LL | E1::Z1(_) => {}
235
235
| ------ ^ expected 0 fields, found 1
236
236
237
237
error[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
239
239
|
240
240
LL | Z1(),
241
241
| -- tuple variant has 0 fields
0 commit comments