2018-02-08 03:35:35 +00:00
|
|
|
error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields
|
2021-08-18 23:13:52 +00:00
|
|
|
--> $DIR/E0023.rs:11:22
|
2018-02-08 03:35:35 +00:00
|
|
|
|
|
2019-09-05 02:04:26 +00:00
|
|
|
LL | Apple(String, String),
|
2021-08-18 23:13:52 +00:00
|
|
|
| ------ ------ tuple variant has 2 fields
|
2019-09-05 02:04:26 +00:00
|
|
|
...
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | Fruit::Apple(a) => {},
|
2021-08-25 21:40:06 +00:00
|
|
|
| ^ expected 2 fields, found 1
|
2021-01-13 03:06:20 +00:00
|
|
|
|
|
|
|
|
help: use `_` to explicitly ignore each field
|
|
|
|
|
|
|
|
|
LL | Fruit::Apple(a, _) => {},
|
2021-06-22 02:07:19 +00:00
|
|
|
| +++
|
2018-02-08 03:35:35 +00:00
|
|
|
|
|
|
|
error[E0023]: this pattern has 3 fields, but the corresponding tuple variant has 2 fields
|
2021-08-18 23:13:52 +00:00
|
|
|
--> $DIR/E0023.rs:12:22
|
2018-02-08 03:35:35 +00:00
|
|
|
|
|
2019-09-05 02:04:26 +00:00
|
|
|
LL | Apple(String, String),
|
2021-08-18 23:13:52 +00:00
|
|
|
| ------ ------ tuple variant has 2 fields
|
2019-09-05 02:04:26 +00:00
|
|
|
...
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | Fruit::Apple(a, b, c) => {},
|
2021-08-25 21:40:06 +00:00
|
|
|
| ^ ^ ^ expected 2 fields, found 3
|
2018-02-08 03:35:35 +00:00
|
|
|
|
|
|
|
error[E0023]: this pattern has 2 fields, but the corresponding tuple variant has 1 field
|
2021-08-18 23:13:52 +00:00
|
|
|
--> $DIR/E0023.rs:13:21
|
2018-02-08 03:35:35 +00:00
|
|
|
|
|
2019-09-05 02:04:26 +00:00
|
|
|
LL | Pear(u32),
|
2021-08-18 23:13:52 +00:00
|
|
|
| --- tuple variant has 1 field
|
2019-09-05 02:04:26 +00:00
|
|
|
...
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | Fruit::Pear(1, 2) => {},
|
2021-08-25 21:40:06 +00:00
|
|
|
| ^ ^ expected 1 field, found 2
|
2018-02-08 03:35:35 +00:00
|
|
|
|
2019-09-19 16:42:05 +00:00
|
|
|
error[E0023]: this pattern has 2 fields, but the corresponding tuple variant has 1 field
|
2021-08-18 23:13:52 +00:00
|
|
|
--> $DIR/E0023.rs:14:23
|
2019-09-19 16:42:05 +00:00
|
|
|
|
|
|
|
|
LL | Orange((String, String)),
|
2021-08-18 23:13:52 +00:00
|
|
|
| ---------------- tuple variant has 1 field
|
2019-09-19 16:42:05 +00:00
|
|
|
...
|
|
|
|
LL | Fruit::Orange(a, b) => {},
|
2021-08-25 21:40:06 +00:00
|
|
|
| ^ ^ expected 1 field, found 2
|
2019-10-24 05:20:58 +00:00
|
|
|
|
|
2020-12-19 03:56:14 +00:00
|
|
|
help: missing parentheses
|
2019-09-19 16:42:05 +00:00
|
|
|
|
|
|
|
|
LL | Fruit::Orange((a, b)) => {},
|
2021-06-22 02:07:19 +00:00
|
|
|
| + +
|
2019-09-19 16:42:05 +00:00
|
|
|
|
2019-09-24 20:42:45 +00:00
|
|
|
error[E0023]: this pattern has 0 fields, but the corresponding tuple variant has 1 field
|
2021-08-25 21:40:06 +00:00
|
|
|
--> $DIR/E0023.rs:15:9
|
2019-09-24 20:42:45 +00:00
|
|
|
|
|
|
|
|
LL | Banana(()),
|
2021-08-18 23:13:52 +00:00
|
|
|
| -- tuple variant has 1 field
|
2019-09-24 20:42:45 +00:00
|
|
|
...
|
|
|
|
LL | Fruit::Banana() => {},
|
2021-08-25 21:40:06 +00:00
|
|
|
| ^^^^^^^^^^^^^^^ expected 1 field, found 0
|
2019-10-24 05:20:58 +00:00
|
|
|
|
|
2020-12-19 03:56:14 +00:00
|
|
|
help: missing parentheses
|
2019-09-24 20:42:45 +00:00
|
|
|
|
|
|
|
|
LL | Fruit::Banana(()) => {},
|
2021-06-22 02:07:19 +00:00
|
|
|
| + +
|
2019-09-24 20:42:45 +00:00
|
|
|
|
|
|
|
error: aborting due to 5 previous errors
|
2018-02-08 03:35:35 +00:00
|
|
|
|
2018-03-03 14:59:40 +00:00
|
|
|
For more information about this error, try `rustc --explain E0023`.
|