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
10 | cannot be named the same as a tuple struct
11 | help: try specify the pattern arguments: `Z1(..)`
13 error[E0532]: expected tuple struct or tuple variant, found unit struct `Z0`
14 --> $DIR/pat-tuple-overfield.rs:52:9
17 | ---------- `Z0` defined here
19 | ------------ similarly named tuple struct `Z1` defined here
24 help: use this syntax instead
28 help: a tuple struct with a similar name exists
33 error[E0532]: expected tuple struct or tuple variant, found unit struct `Z0`
34 --> $DIR/pat-tuple-overfield.rs:53:9
37 | ---------- `Z0` defined here
39 | ------------ similarly named tuple struct `Z1` defined here
44 help: use this syntax instead
48 help: a tuple struct with a similar name exists
53 error[E0532]: expected tuple struct or tuple variant, found unit struct `Z0`
54 --> $DIR/pat-tuple-overfield.rs:54:9
57 | ---------- `Z0` defined here
59 | ------------ similarly named tuple struct `Z1` defined here
64 help: use this syntax instead
68 help: a tuple struct with a similar name exists
73 error[E0532]: expected tuple struct or tuple variant, found unit variant `E1::Z0`
74 --> $DIR/pat-tuple-overfield.rs:64:9
77 | -- `E1::Z0` defined here
79 | ---- similarly named tuple variant `Z1` defined here
84 help: use this syntax instead
88 help: a tuple variant with a similar name exists
93 error[E0532]: expected tuple struct or tuple variant, found unit variant `E1::Z0`
94 --> $DIR/pat-tuple-overfield.rs:65:9
97 | -- `E1::Z0` defined here
99 | ---- similarly named tuple variant `Z1` defined here
104 help: use this syntax instead
108 help: a tuple variant with a similar name exists
113 error[E0532]: expected tuple struct or tuple variant, found unit variant `E1::Z0`
114 --> $DIR/pat-tuple-overfield.rs:66:9
117 | -- `E1::Z0` defined here
119 | ---- similarly named tuple variant `Z1` defined here
121 LL | E1::Z0(_, _) => {}
124 help: use this syntax instead
128 help: a tuple variant with a similar name exists
130 LL | E1::Z1(_, _) => {}
133 error[E0532]: expected unit struct, unit variant or constant, found tuple variant `E1::Z1`
134 --> $DIR/pat-tuple-overfield.rs:69:9
137 | -- similarly named unit variant `Z0` defined here
139 | ---- `E1::Z1` defined here
144 help: use the tuple variant pattern syntax instead
148 help: a unit variant with a similar name exists
153 error[E0308]: mismatched types
154 --> $DIR/pat-tuple-overfield.rs:19:9
156 LL | match (1, 2, 3) {
157 | --------- this expression has type `({integer}, {integer}, {integer})`
158 LL | (1, 2, 3, 4) => {}
159 | ^^^^^^^^^^^^ expected a tuple with 3 elements, found one with 4 elements
161 = note: expected tuple `({integer}, {integer}, {integer})`
162 found tuple `(_, _, _, _)`
164 error[E0308]: mismatched types
165 --> $DIR/pat-tuple-overfield.rs:20:9
167 LL | match (1, 2, 3) {
168 | --------- this expression has type `({integer}, {integer}, {integer})`
169 LL | (1, 2, 3, 4) => {}
170 LL | (1, 2, .., 3, 4) => {}
171 | ^^^^^^^^^^^^^^^^ expected a tuple with 3 elements, found one with 4 elements
173 = note: expected tuple `({integer}, {integer}, {integer})`
174 found tuple `(_, _, _, _)`
176 error[E0023]: this pattern has 4 fields, but the corresponding tuple struct has 3 fields
177 --> $DIR/pat-tuple-overfield.rs:24:11
179 LL | struct S(u8, u8, u8);
180 | -- -- -- tuple struct has 3 fields
182 LL | S(1, 2, 3, 4) => {}
183 | ^ ^ ^ ^ expected 3 fields, found 4
185 error[E0023]: this pattern has 4 fields, but the corresponding tuple struct has 3 fields
186 --> $DIR/pat-tuple-overfield.rs:26:11
188 LL | struct S(u8, u8, u8);
189 | -- -- -- tuple struct has 3 fields
191 LL | S(1, 2, .., 3, 4) => {}
192 | ^ ^ ^ ^ expected 3 fields, found 4
194 error[E0023]: this pattern has 6 fields, but the corresponding tuple struct has 5 fields
195 --> $DIR/pat-tuple-overfield.rs:31:11
198 | - tuple struct defined here
208 | -- tuple struct has 5 fields
210 LL | M(1, 2, 3, 4, 5, 6) => {}
211 | ^ ^ ^ ^ ^ ^ expected 5 fields, found 6
213 error[E0023]: this pattern has 6 fields, but the corresponding tuple struct has 5 fields
214 --> $DIR/pat-tuple-overfield.rs:33:11
217 | - tuple struct defined here
227 | -- tuple struct has 5 fields
240 | ^ expected 5 fields, found 6
242 error[E0023]: this pattern has 6 fields, but the corresponding tuple struct has 5 fields
243 --> $DIR/pat-tuple-overfield.rs:41:13
246 | - tuple struct defined here
256 | -- tuple struct has 5 fields
271 | ^ expected 5 fields, found 6
273 error[E0023]: this pattern has 1 field, but the corresponding tuple struct has 0 fields
274 --> $DIR/pat-tuple-overfield.rs:59:12
277 | --------- tuple struct has 0 fields
280 | ^ expected 0 fields, found 1
282 error[E0023]: this pattern has 2 fields, but the corresponding tuple struct has 0 fields
283 --> $DIR/pat-tuple-overfield.rs:60:12
286 | --------- tuple struct has 0 fields
289 | ^ ^ expected 0 fields, found 2
291 error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 0 fields
292 --> $DIR/pat-tuple-overfield.rs:71:16
295 | -- tuple variant has 0 fields
298 | ^ expected 0 fields, found 1
300 error[E0023]: this pattern has 2 fields, but the corresponding tuple variant has 0 fields
301 --> $DIR/pat-tuple-overfield.rs:72:16
304 | -- tuple variant has 0 fields
306 LL | E1::Z1(_, _) => {}
307 | ^ ^ expected 0 fields, found 2
309 error: aborting due to 19 previous errors
311 Some errors have detailed explanations: E0023, E0308, E0530, E0532.
312 For more information about an error, try `rustc --explain E0023`.