We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9e8c4e6 commit 9d46208Copy full SHA for 9d46208
src/librustc_error_codes/error_codes/E0023.md
@@ -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.
+A pattern attempted to extract an incorrect number of fields from a variant.
+
+Erroneous code example:
4
5
```
6
enum Fruit {
@@ -9,6 +9,9 @@ enum Fruit {
9
}
10
11
12
+A pattern used to match against an enum variant must provide a sub-pattern for
13
+each field of the enum variant.
14
15
Here the `Apple` variant has two fields, and should be matched against like so:
16
17
0 commit comments