2021-02-14 12:14:11 -06:00
|
|
|
error[E0769]: tuple variant `E::S` written as struct variant
|
2021-01-20 20:49:11 -06:00
|
|
|
--> $DIR/struct-tuple-field-names.rs:8:9
|
|
|
|
|
|
|
|
|
LL | E::S { 0, 1 } => {}
|
2021-02-20 14:33:08 -06:00
|
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: use the tuple variant pattern syntax instead
|
|
|
|
|
|
|
|
|
LL | E::S(_, _) => {}
|
2021-06-21 21:07:19 -05:00
|
|
|
| ~~~~~~
|
2021-01-20 20:49:11 -06:00
|
|
|
|
|
|
|
error[E0769]: tuple variant `S` written as struct variant
|
|
|
|
--> $DIR/struct-tuple-field-names.rs:13:9
|
|
|
|
|
|
|
|
|
LL | S { } => {}
|
2021-02-20 14:33:08 -06:00
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
|
help: use the tuple variant pattern syntax instead
|
|
|
|
|
|
|
|
|
LL | S(_, _) => {}
|
2021-06-21 21:07:19 -05:00
|
|
|
| ~~~~~~
|
2021-01-20 20:49:11 -06:00
|
|
|
|
2023-03-30 03:35:06 -05:00
|
|
|
error[E0027]: pattern does not mention field `1`
|
|
|
|
--> $DIR/struct-tuple-field-names.rs:16:12
|
|
|
|
|
|
|
|
|
LL | if let E::S { 0: a } = x {
|
|
|
|
| ^^^^^^^^^^^^^ missing field `1`
|
|
|
|
|
|
|
|
|
help: include the missing field in the pattern
|
|
|
|
|
|
|
|
|
LL | if let E::S { 0: a, 1: _ } = x {
|
|
|
|
| ~~~~~~~~
|
|
|
|
help: if you don't care about this missing field, you can explicitly ignore it
|
|
|
|
|
|
|
|
|
LL | if let E::S { 0: a, .. } = x {
|
|
|
|
| ~~~~~~
|
|
|
|
|
|
|
|
error: aborting due to 3 previous errors
|
2021-01-20 20:49:11 -06:00
|
|
|
|
2023-03-30 03:35:06 -05:00
|
|
|
Some errors have detailed explanations: E0027, E0769.
|
|
|
|
For more information about an error, try `rustc --explain E0027`.
|