| error: `..` can only be used once per tuple struct or variant pattern |
| --> $DIR/tuple_struct_destructure_fail.rs:25:27 |
| | |
| LL | TupleStruct(a, .., b, ..) = TupleStruct(0, 1); |
| | -- ^^ can only be used once per tuple struct or variant pattern |
| | | |
| | previously used here |
| |
| error: `..` can only be used once per tuple struct or variant pattern |
| --> $DIR/tuple_struct_destructure_fail.rs:27:35 |
| | |
| LL | Enum::SingleVariant(a, .., b, ..) = Enum::SingleVariant(0, 1); |
| | -- ^^ can only be used once per tuple struct or variant pattern |
| | | |
| | previously used here |
| |
| error[E0023]: this pattern has 3 fields, but the corresponding tuple struct has 2 fields |
| --> $DIR/tuple_struct_destructure_fail.rs:30:5 |
| | |
| LL | struct TupleStruct<S, T>(S, T); |
| | ------------------------------- tuple struct defined here |
| ... |
| LL | TupleStruct(a, a, b) = TupleStruct(1, 2); |
| | ^^^^^^^^^^^^^^^^^^^^ expected 2 fields, found 3 |
| |
| error[E0023]: this pattern has 1 field, but the corresponding tuple struct has 2 fields |
| --> $DIR/tuple_struct_destructure_fail.rs:32:5 |
| | |
| LL | struct TupleStruct<S, T>(S, T); |
| | ------------------------------- tuple struct defined here |
| ... |
| LL | TupleStruct(_) = TupleStruct(1, 2); |
| | ^^^^^^^^^^^^^^ expected 2 fields, found 1 |
| |
| error[E0023]: this pattern has 3 fields, but the corresponding tuple variant has 2 fields |
| --> $DIR/tuple_struct_destructure_fail.rs:34:5 |
| | |
| LL | SingleVariant(S, T) |
| | ------------------- tuple variant defined here |
| ... |
| LL | Enum::SingleVariant(a, a, b) = Enum::SingleVariant(1, 2); |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 2 fields, found 3 |
| |
| error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields |
| --> $DIR/tuple_struct_destructure_fail.rs:36:5 |
| | |
| LL | SingleVariant(S, T) |
| | ------------------- tuple variant defined here |
| ... |
| LL | Enum::SingleVariant(_) = Enum::SingleVariant(1, 2); |
| | ^^^^^^^^^^^^^^^^^^^^^^ expected 2 fields, found 1 |
| |
| error[E0070]: invalid left-hand side of assignment |
| --> $DIR/tuple_struct_destructure_fail.rs:40:12 |
| | |
| LL | test() = TupleStruct(0, 0); |
| | ------ ^ |
| | | |
| | cannot assign to this expression |
| |
| error[E0070]: invalid left-hand side of assignment |
| --> $DIR/tuple_struct_destructure_fail.rs:42:14 |
| | |
| LL | (test)() = TupleStruct(0, 0); |
| | -------- ^ |
| | | |
| | cannot assign to this expression |
| |
| error[E0070]: invalid left-hand side of assignment |
| --> $DIR/tuple_struct_destructure_fail.rs:44:38 |
| | |
| LL | <Alias::<isize> as Test>::test() = TupleStruct(0, 0); |
| | -------------------------------- ^ |
| | | |
| | cannot assign to this expression |
| |
| error: aborting due to 9 previous errors |
| |
| Some errors have detailed explanations: E0023, E0070. |
| For more information about an error, try `rustc --explain E0023`. |