Skip to content

Commit 30422de

Browse files
committed
Auto merge of #33682 - GuillaumeGomez:fix-error-explanation-enum, r=sanxiyn
Fix invalid enum declaration r? @steveklabnik cc @Ms2ger
2 parents 5d12502 + 6e1154d commit 30422de

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/librustc_typeck/diagnostics.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,16 @@ Matching with the wrong number of fields has no sensible interpretation:
4545
4646
```compile_fail
4747
enum Fruit {
48-
Fruit::Apple(String, String),
49-
Fruit::Pear(u32),
48+
Apple(String, String),
49+
Pear(u32),
5050
}
5151
5252
let x = Fruit::Apple(String::new(), String::new());
5353
5454
// Incorrect.
5555
match x {
56-
Apple(a) => {},
57-
Apple(a, b, c) => {},
56+
Fruit::Apple(a) => {},
57+
Fruit::Apple(a, b, c) => {},
5858
}
5959
```
6060

0 commit comments

Comments
 (0)