Auto merge of #33682 - GuillaumeGomez:fix-error-explanation-enum, r=sanxiyn

Fix invalid enum declaration

r? @steveklabnik
cc @Ms2ger
This commit is contained in:
bors 2016-05-17 07:53:49 -07:00
commit 30422de32d

View file

@ -45,16 +45,16 @@ Matching with the wrong number of fields has no sensible interpretation:
```compile_fail
enum Fruit {
Fruit::Apple(String, String),
Fruit::Pear(u32),
Apple(String, String),
Pear(u32),
}
let x = Fruit::Apple(String::new(), String::new());
// Incorrect.
match x {
Apple(a) => {},
Apple(a, b, c) => {},
Fruit::Apple(a) => {},
Fruit::Apple(a, b, c) => {},
}
```