]> git.lizzy.rs Git - rust.git/blob - src/test/ui/error-codes/E0023.stderr
Merge commit '533f0fc81ab9ba097779fcd27c8f9ea12261fef5' into psimd
[rust.git] / src / test / ui / error-codes / E0023.stderr
1 error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields
2   --> $DIR/E0023.rs:11:22
3    |
4 LL |     Apple(String, String),
5    |           ------  ------ tuple variant has 2 fields
6 ...
7 LL |         Fruit::Apple(a) => {},
8    |                      ^ expected 2 fields, found 1
9    |
10 help: use `_` to explicitly ignore each field
11    |
12 LL |         Fruit::Apple(a, _) => {},
13    |                       +++
14
15 error[E0023]: this pattern has 3 fields, but the corresponding tuple variant has 2 fields
16   --> $DIR/E0023.rs:12:22
17    |
18 LL |     Apple(String, String),
19    |           ------  ------ tuple variant has 2 fields
20 ...
21 LL |         Fruit::Apple(a, b, c) => {},
22    |                      ^  ^  ^ expected 2 fields, found 3
23
24 error[E0023]: this pattern has 2 fields, but the corresponding tuple variant has 1 field
25   --> $DIR/E0023.rs:13:21
26    |
27 LL |     Pear(u32),
28    |          --- tuple variant has 1 field
29 ...
30 LL |         Fruit::Pear(1, 2) => {},
31    |                     ^  ^ expected 1 field, found 2
32
33 error[E0023]: this pattern has 2 fields, but the corresponding tuple variant has 1 field
34   --> $DIR/E0023.rs:14:23
35    |
36 LL |     Orange((String, String)),
37    |            ---------------- tuple variant has 1 field
38 ...
39 LL |         Fruit::Orange(a, b) => {},
40    |                       ^  ^ expected 1 field, found 2
41    |
42 help: missing parentheses
43    |
44 LL |         Fruit::Orange((a, b)) => {},
45    |                       +    +
46
47 error[E0023]: this pattern has 0 fields, but the corresponding tuple variant has 1 field
48   --> $DIR/E0023.rs:15:9
49    |
50 LL |     Banana(()),
51    |            -- tuple variant has 1 field
52 ...
53 LL |         Fruit::Banana() => {},
54    |         ^^^^^^^^^^^^^^^ expected 1 field, found 0
55    |
56 help: missing parentheses
57    |
58 LL |         Fruit::Banana(()) => {},
59    |                      +  +
60
61 error: aborting due to 5 previous errors
62
63 For more information about this error, try `rustc --explain E0023`.