Skip to content

Commit

Permalink
Fix invalid enum declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed May 17, 2016
1 parent 5743564 commit 6e1154d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/librustc_typeck/diagnostics.rs
Expand Up @@ -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) => {},
}
```
Expand Down

0 comments on commit 6e1154d

Please sign in to comment.