1 error[E0530]: match bindings cannot shadow tuple structs
2 --> $DIR/pat-tuple-overfield.rs:57:9
5 | ------------ the tuple struct `Z1` is defined here
8 | ^^ cannot be named the same as a tuple struct
10 error[E0532]: expected tuple struct or tuple variant, found unit struct `Z0`
11 --> $DIR/pat-tuple-overfield.rs:52:9
14 | ---------- `Z0` defined here
16 | ------------ similarly named tuple struct `Z1` defined here
21 help: use this syntax instead
25 help: a tuple struct with a similar name exists
30 error[E0532]: expected tuple struct or tuple variant, found unit struct `Z0`
31 --> $DIR/pat-tuple-overfield.rs:53:9
34 | ---------- `Z0` defined here
36 | ------------ similarly named tuple struct `Z1` defined here
41 help: use this syntax instead
45 help: a tuple struct with a similar name exists
50 error[E0532]: expected tuple struct or tuple variant, found unit struct `Z0`
51 --> $DIR/pat-tuple-overfield.rs:54:9
54 | ---------- `Z0` defined here
56 | ------------ similarly named tuple struct `Z1` defined here
61 help: use this syntax instead
65 help: a tuple struct with a similar name exists
70 error[E0532]: expected tuple struct or tuple variant, found unit variant `E1::Z0`
71 --> $DIR/pat-tuple-overfield.rs:64:9
74 | -- `E1::Z0` defined here
76 | ---- similarly named tuple variant `Z1` defined here
81 help: use this syntax instead
85 help: a tuple variant with a similar name exists
90 error[E0532]: expected tuple struct or tuple variant, found unit variant `E1::Z0`
91 --> $DIR/pat-tuple-overfield.rs:65:9
94 | -- `E1::Z0` defined here
96 | ---- similarly named tuple variant `Z1` defined here
101 help: use this syntax instead
105 help: a tuple variant with a similar name exists
110 error[E0532]: expected tuple struct or tuple variant, found unit variant `E1::Z0`
111 --> $DIR/pat-tuple-overfield.rs:66:9
114 | -- `E1::Z0` defined here
116 | ---- similarly named tuple variant `Z1` defined here
118 LL | E1::Z0(_, _) => {}
121 help: use this syntax instead
125 help: a tuple variant with a similar name exists
127 LL | E1::Z1(_, _) => {}
130 error[E0532]: expected unit struct, unit variant or constant, found tuple variant `E1::Z1`
131 --> $DIR/pat-tuple-overfield.rs:69:9
134 | -- similarly named unit variant `Z0` defined here
136 | ---- `E1::Z1` defined here
141 help: use the tuple variant pattern syntax instead
145 help: a unit variant with a similar name exists
150 error[E0308]: mismatched types
151 --> $DIR/pat-tuple-overfield.rs:19:9
153 LL | match (1, 2, 3) {
154 | --------- this expression has type `({integer}, {integer}, {integer})`
155 LL | (1, 2, 3, 4) => {}
156 | ^^^^^^^^^^^^ expected a tuple with 3 elements, found one with 4 elements
158 = note: expected tuple `({integer}, {integer}, {integer})`
159 found tuple `(_, _, _, _)`
161 error[E0308]: mismatched types
162 --> $DIR/pat-tuple-overfield.rs:20:9
164 LL | match (1, 2, 3) {
165 | --------- this expression has type `({integer}, {integer}, {integer})`
166 LL | (1, 2, 3, 4) => {}
167 LL | (1, 2, .., 3, 4) => {}
168 | ^^^^^^^^^^^^^^^^ expected a tuple with 3 elements, found one with 4 elements
170 = note: expected tuple `({integer}, {integer}, {integer})`
171 found tuple `(_, _, _, _)`
173 error[E0023]: this pattern has 4 fields, but the corresponding tuple struct has 3 fields
174 --> $DIR/pat-tuple-overfield.rs:24:11
176 LL | struct S(u8, u8, u8);
177 | -- -- -- tuple struct has 3 fields
179 LL | S(1, 2, 3, 4) => {}
180 | ^ ^ ^ ^ expected 3 fields, found 4
182 error[E0023]: this pattern has 4 fields, but the corresponding tuple struct has 3 fields
183 --> $DIR/pat-tuple-overfield.rs:26:11
185 LL | struct S(u8, u8, u8);
186 | -- -- -- tuple struct has 3 fields
188 LL | S(1, 2, .., 3, 4) => {}
189 | ^ ^ ^ ^ expected 3 fields, found 4
191 error[E0023]: this pattern has 6 fields, but the corresponding tuple struct has 5 fields
192 --> $DIR/pat-tuple-overfield.rs:31:11
195 | - tuple struct defined here
205 | -- tuple struct has 5 fields
207 LL | M(1, 2, 3, 4, 5, 6) => {}
208 | ^ ^ ^ ^ ^ ^ expected 5 fields, found 6
210 error[E0023]: this pattern has 6 fields, but the corresponding tuple struct has 5 fields
211 --> $DIR/pat-tuple-overfield.rs:33:11
214 | - tuple struct defined here
224 | -- tuple struct has 5 fields
237 | ^ expected 5 fields, found 6
239 error[E0023]: this pattern has 6 fields, but the corresponding tuple struct has 5 fields
240 --> $DIR/pat-tuple-overfield.rs:41:13
243 | - tuple struct defined here
253 | -- tuple struct has 5 fields
268 | ^ expected 5 fields, found 6
270 error[E0023]: this pattern has 1 field, but the corresponding tuple struct has 0 fields
271 --> $DIR/pat-tuple-overfield.rs:59:12
274 | ------------ tuple struct has 0 fields
277 | ^ expected 0 fields, found 1
279 error[E0023]: this pattern has 2 fields, but the corresponding tuple struct has 0 fields
280 --> $DIR/pat-tuple-overfield.rs:60:12
283 | ------------ tuple struct has 0 fields
286 | ^ ^ expected 0 fields, found 2
288 error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 0 fields
289 --> $DIR/pat-tuple-overfield.rs:71:16
292 | ---- tuple variant has 0 fields
295 | ^ expected 0 fields, found 1
297 error[E0023]: this pattern has 2 fields, but the corresponding tuple variant has 0 fields
298 --> $DIR/pat-tuple-overfield.rs:72:16
301 | ---- tuple variant has 0 fields
303 LL | E1::Z1(_, _) => {}
304 | ^ ^ expected 0 fields, found 2
306 error: aborting due to 19 previous errors
308 Some errors have detailed explanations: E0023, E0308, E0530, E0532.
309 For more information about an error, try `rustc --explain E0023`.