File: E0023.stderr

package info (click to toggle)
rustc-web 1.78.0%2Bdfsg1-2~deb12u3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,245,420 kB
  • sloc: xml: 147,985; javascript: 18,022; sh: 11,083; python: 10,265; ansic: 6,172; cpp: 5,023; asm: 4,390; makefile: 4,269
file content (63 lines) | stat: -rw-r--r-- 1,957 bytes parent folder | download | duplicates (14)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields
  --> $DIR/E0023.rs:11:22
   |
LL |     Apple(String, String),
   |           ------  ------ tuple variant has 2 fields
...
LL |         Fruit::Apple(a) => {},
   |                      ^ expected 2 fields, found 1
   |
help: use `_` to explicitly ignore each field
   |
LL |         Fruit::Apple(a, _) => {},
   |                       +++

error[E0023]: this pattern has 3 fields, but the corresponding tuple variant has 2 fields
  --> $DIR/E0023.rs:12:22
   |
LL |     Apple(String, String),
   |           ------  ------ tuple variant has 2 fields
...
LL |         Fruit::Apple(a, b, c) => {},
   |                      ^  ^  ^ expected 2 fields, found 3

error[E0023]: this pattern has 2 fields, but the corresponding tuple variant has 1 field
  --> $DIR/E0023.rs:13:21
   |
LL |     Pear(u32),
   |          --- tuple variant has 1 field
...
LL |         Fruit::Pear(1, 2) => {},
   |                     ^  ^ expected 1 field, found 2

error[E0023]: this pattern has 2 fields, but the corresponding tuple variant has 1 field
  --> $DIR/E0023.rs:14:23
   |
LL |     Orange((String, String)),
   |            ---------------- tuple variant has 1 field
...
LL |         Fruit::Orange(a, b) => {},
   |                       ^  ^ expected 1 field, found 2
   |
help: missing parentheses
   |
LL |         Fruit::Orange((a, b)) => {},
   |                       +    +

error[E0023]: this pattern has 0 fields, but the corresponding tuple variant has 1 field
  --> $DIR/E0023.rs:15:9
   |
LL |     Banana(()),
   |            -- tuple variant has 1 field
...
LL |         Fruit::Banana() => {},
   |         ^^^^^^^^^^^^^^^ expected 1 field, found 0
   |
help: missing parentheses
   |
LL |         Fruit::Banana(()) => {},
   |                      +  +

error: aborting due to 5 previous errors

For more information about this error, try `rustc --explain E0023`.