Skip to content

Commit

Permalink
Auto merge of rust-lang#33682 - GuillaumeGomez:fix-error-explanation-…
Browse files Browse the repository at this point in the history
…enum, r=sanxiyn

Fix invalid enum declaration

r? @steveklabnik
cc @Ms2ger
  • Loading branch information
bors committed May 17, 2016
2 parents 5d12502 + 6e1154d commit 30422de
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/librustc_typeck/diagnostics.rs
Original file line number Diff line number Diff line change
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 30422de

Please sign in to comment.