fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #66089 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4560ea788cb

1.39.0
1.8 KiB56 linesraw
1error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields
2  --> $DIR/E0023.rs:11:9
3   |
4LL |     Apple(String, String),
5   |     --------------------- tuple variant defined here
6...
7LL |         Fruit::Apple(a) => {},
8   |         ^^^^^^^^^^^^^^^ expected 2 fields, found 1
9
10error[E0023]: this pattern has 3 fields, but the corresponding tuple variant has 2 fields
11  --> $DIR/E0023.rs:12:9
12   |
13LL |     Apple(String, String),
14   |     --------------------- tuple variant defined here
15...
16LL |         Fruit::Apple(a, b, c) => {},
17   |         ^^^^^^^^^^^^^^^^^^^^^ expected 2 fields, found 3
18
19error[E0023]: this pattern has 2 fields, but the corresponding tuple variant has 1 field
20  --> $DIR/E0023.rs:13:9
21   |
22LL |     Pear(u32),
23   |     --------- tuple variant defined here
24...
25LL |         Fruit::Pear(1, 2) => {},
26   |         ^^^^^^^^^^^^^^^^^ expected 1 field, found 2
27
28error[E0023]: this pattern has 2 fields, but the corresponding tuple variant has 1 field
29  --> $DIR/E0023.rs:14:9
30   |
31LL |     Orange((String, String)),
32   |     ------------------------ tuple variant defined here
33...
34LL |         Fruit::Orange(a, b) => {},
35   |         ^^^^^^^^^^^^^^^^^^^ expected 1 field, found 2
36help: missing parenthesis
37   |
38LL |         Fruit::Orange((a, b)) => {},
39   |                       ^    ^
40
41error[E0023]: this pattern has 0 fields, but the corresponding tuple variant has 1 field
42  --> $DIR/E0023.rs:15:9
43   |
44LL |     Banana(()),
45   |     ---------- tuple variant defined here
46...
47LL |         Fruit::Banana() => {},
48   |         ^^^^^^^^^^^^^^^ expected 1 field, found 0
49help: missing parenthesis
50   |
51LL |         Fruit::Banana(()) => {},
52   |                      ^  ^
53
54error: aborting due to 5 previous errors
55
56For more information about this error, try `rustc --explain E0023`.