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
695 B
Plaintext
Raw Normal View History

2018-08-08 07:28:26 -05:00
error[E0023]: this pattern has 2 fields, but the corresponding tuple variant has 3 fields
2021-08-18 18:13:52 -05:00
--> $DIR/match-pattern-field-mismatch.rs:10:22
2018-08-08 07:28:26 -05:00
|
LL | Rgb(usize, usize, usize),
2021-08-18 18:13:52 -05: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 07:28:26 -05:00
error: aborting due to previous error
For more information about this error, try `rustc --explain E0023`.