1 error: `..` can only be used once per tuple struct or variant pattern
2 --> $DIR/tuple_struct_destructure_fail.rs:23:27
4 LL | TupleStruct(a, .., b, ..) = TupleStruct(0, 1);
5 | -- ^^ can only be used once per tuple struct or variant pattern
9 error: `..` can only be used once per tuple struct or variant pattern
10 --> $DIR/tuple_struct_destructure_fail.rs:25:35
12 LL | Enum::SingleVariant(a, .., b, ..) = Enum::SingleVariant(0, 1);
13 | -- ^^ can only be used once per tuple struct or variant pattern
15 | previously used here
17 error[E0023]: this pattern has 3 fields, but the corresponding tuple struct has 2 fields
18 --> $DIR/tuple_struct_destructure_fail.rs:28:17
20 LL | struct TupleStruct<S, T>(S, T);
21 | - - tuple struct has 2 fields
23 LL | TupleStruct(a, a, b) = TupleStruct(1, 2);
24 | ^ ^ ^ expected 2 fields, found 3
26 error[E0023]: this pattern has 1 field, but the corresponding tuple struct has 2 fields
27 --> $DIR/tuple_struct_destructure_fail.rs:30:17
29 LL | struct TupleStruct<S, T>(S, T);
30 | - - tuple struct has 2 fields
32 LL | TupleStruct(_) = TupleStruct(1, 2);
33 | ^ expected 2 fields, found 1
35 help: use `_` to explicitly ignore each field
37 LL | TupleStruct(_, _) = TupleStruct(1, 2);
39 help: use `..` to ignore all fields
41 LL | TupleStruct(..) = TupleStruct(1, 2);
44 error[E0023]: this pattern has 3 fields, but the corresponding tuple variant has 2 fields
45 --> $DIR/tuple_struct_destructure_fail.rs:32:25
47 LL | SingleVariant(S, T)
48 | - - tuple variant has 2 fields
50 LL | Enum::SingleVariant(a, a, b) = Enum::SingleVariant(1, 2);
51 | ^ ^ ^ expected 2 fields, found 3
53 error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields
54 --> $DIR/tuple_struct_destructure_fail.rs:34:25
56 LL | SingleVariant(S, T)
57 | - - tuple variant has 2 fields
59 LL | Enum::SingleVariant(_) = Enum::SingleVariant(1, 2);
60 | ^ expected 2 fields, found 1
62 help: use `_` to explicitly ignore each field
64 LL | Enum::SingleVariant(_, _) = Enum::SingleVariant(1, 2);
66 help: use `..` to ignore all fields
68 LL | Enum::SingleVariant(..) = Enum::SingleVariant(1, 2);
71 error[E0070]: invalid left-hand side of assignment
72 --> $DIR/tuple_struct_destructure_fail.rs:38:12
74 LL | test() = TupleStruct(0, 0);
77 | cannot assign to this expression
79 error[E0070]: invalid left-hand side of assignment
80 --> $DIR/tuple_struct_destructure_fail.rs:40:14
82 LL | (test)() = TupleStruct(0, 0);
85 | cannot assign to this expression
87 error[E0070]: invalid left-hand side of assignment
88 --> $DIR/tuple_struct_destructure_fail.rs:42:38
90 LL | <Alias::<isize> as Test>::test() = TupleStruct(0, 0);
91 | -------------------------------- ^
93 | cannot assign to this expression
95 error: aborting due to 9 previous errors
97 Some errors have detailed explanations: E0023, E0070.
98 For more information about an error, try `rustc --explain E0023`.