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 ea62c2e commit 60d9c2cCopy full SHA for 60d9c2c
src/librustc_error_codes/error_codes/E0023.md
@@ -2,11 +2,18 @@ A pattern attempted to extract an incorrect number of fields from a variant.
2
3
Erroneous code example:
4
5
-```
+```compile_fail,E0023
6
enum Fruit {
7
Apple(String, String),
8
Pear(u32),
9
}
10
+
11
+let x = Fruit::Apple(String::new(), String::new());
12
13
+match x {
14
+ Fruit::Apple(a) => {}, // error!
15
+ _ => {}
16
+}
17
```
18
19
A pattern used to match against an enum variant must provide a sub-pattern for
0 commit comments