1 error: `..` can only be used once per tuple struct or variant pattern
2 --> $DIR/tuple_struct_destructure_fail.rs:25: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:27: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:30:5
20 LL | struct TupleStruct<S, T>(S, T);
21 | ------------------------------- tuple struct defined here
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:32:5
29 LL | struct TupleStruct<S, T>(S, T);
30 | ------------------------------- tuple struct defined here
32 LL | TupleStruct(_) = TupleStruct(1, 2);
33 | ^^^^^^^^^^^^^^ expected 2 fields, found 1
35 error[E0023]: this pattern has 3 fields, but the corresponding tuple variant has 2 fields
36 --> $DIR/tuple_struct_destructure_fail.rs:34:5
38 LL | SingleVariant(S, T)
39 | ------------------- tuple variant defined here
41 LL | Enum::SingleVariant(a, a, b) = Enum::SingleVariant(1, 2);
42 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 2 fields, found 3
44 error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields
45 --> $DIR/tuple_struct_destructure_fail.rs:36:5
47 LL | SingleVariant(S, T)
48 | ------------------- tuple variant defined here
50 LL | Enum::SingleVariant(_) = Enum::SingleVariant(1, 2);
51 | ^^^^^^^^^^^^^^^^^^^^^^ expected 2 fields, found 1
53 error[E0070]: invalid left-hand side of assignment
54 --> $DIR/tuple_struct_destructure_fail.rs:40:12
56 LL | test() = TupleStruct(0, 0);
59 | cannot assign to this expression
61 error[E0070]: invalid left-hand side of assignment
62 --> $DIR/tuple_struct_destructure_fail.rs:42:14
64 LL | (test)() = TupleStruct(0, 0);
67 | cannot assign to this expression
69 error[E0070]: invalid left-hand side of assignment
70 --> $DIR/tuple_struct_destructure_fail.rs:44:38
72 LL | <Alias::<isize> as Test>::test() = TupleStruct(0, 0);
73 | -------------------------------- ^
75 | cannot assign to this expression
77 error: aborting due to 9 previous errors
79 Some errors have detailed explanations: E0023, E0070.
80 For more information about an error, try `rustc --explain E0023`.