mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-22 02:00:00 +03:00
Clean up E0023
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
A pattern used to match against an enum variant must provide a sub-pattern for
|
||||
each field of the enum variant. This error indicates that a pattern attempted to
|
||||
extract an incorrect number of fields from a variant.
|
||||
A pattern attempted to extract an incorrect number of fields from a variant.
|
||||
|
||||
Erroneous code example:
|
||||
|
||||
```
|
||||
enum Fruit {
|
||||
@@ -9,6 +9,9 @@ enum Fruit {
|
||||
}
|
||||
```
|
||||
|
||||
A pattern used to match against an enum variant must provide a sub-pattern for
|
||||
each field of the enum variant.
|
||||
|
||||
Here the `Apple` variant has two fields, and should be matched against like so:
|
||||
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user