Skip to content

Commit

Permalink
Add E0416 error explanation
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Aug 6, 2015
1 parent 4840c13 commit 378aba4
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion src/librustc_resolve/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,26 @@ fn foo(f: i32, g: i32) {} // ok!
```
"##,

E0416: r##"
An identifier is bound more than once in a pattern. Example of erroneous
code:
```
match (1, 2) {
(x, x) => {} // error: identifier `x` is bound more than once in the
// same pattern
}
```
Please verify you didn't misspell identifiers' name. Example:
```
match (1, 2) {
(x, y) => {} // ok!
}
```
"##,

E0417: r##"
A static variable was referenced in a pattern. Example of erroneous code:
Expand Down Expand Up @@ -796,7 +816,6 @@ register_diagnostics! {
E0410, // variable from pattern is not bound in pattern 1
E0411, // use of `Self` outside of an impl or trait
E0414, // only irrefutable patterns allowed here
E0416, // identifier is bound more than once in the same pattern
E0418, // is not an enum variant, struct or const
E0420, // is not an associated const
E0421, // unresolved associated const
Expand Down

0 comments on commit 378aba4

Please sign in to comment.