rust/tests/ui/match/match-pattern-field-mismatch.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
697 B
Plaintext
Raw Normal View History

2018-08-08 12:28:26 +00:00
error[E0023]: this pattern has 2 fields, but the corresponding tuple variant has 3 fields
2021-08-18 23:13:52 +00:00
--> $DIR/match-pattern-field-mismatch.rs:10:22
2018-08-08 12:28:26 +00:00
|
LL | Rgb(usize, usize, usize),
2021-08-18 23:13:52 +00:00
| ----- ----- ----- tuple variant has 3 fields
...
LL | Color::Rgb(_, _) => { }
| ^ ^ expected 3 fields, found 2
|
help: use `_` to explicitly ignore each field
|
LL | Color::Rgb(_, _, _) => { }
| +++
help: use `..` to ignore all fields
|
LL | Color::Rgb(..) => { }
| ~~
2018-08-08 12:28:26 +00:00
error: aborting due to 1 previous error
2018-08-08 12:28:26 +00:00
For more information about this error, try `rustc --explain E0023`.