Skip to content

Commit 9d46208

Browse files
Clean up E0023
1 parent 9e8c4e6 commit 9d46208

File tree

1 file changed

+6
-3
lines changed
  • src/librustc_error_codes/error_codes

1 file changed

+6
-3
lines changed

src/librustc_error_codes/error_codes/E0023.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
A pattern used to match against an enum variant must provide a sub-pattern for
2-
each field of the enum variant. This error indicates that a pattern attempted to
3-
extract an incorrect number of fields from a variant.
1+
A pattern attempted to extract an incorrect number of fields from a variant.
2+
3+
Erroneous code example:
44

55
```
66
enum Fruit {
@@ -9,6 +9,9 @@ enum Fruit {
99
}
1010
```
1111

12+
A pattern used to match against an enum variant must provide a sub-pattern for
13+
each field of the enum variant.
14+
1215
Here the `Apple` variant has two fields, and should be matched against like so:
1316

1417
```

0 commit comments

Comments
 (0)