Skip to content

Commit

Permalink
Add E0403 error explanation
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Jul 21, 2015
1 parent 90a3692 commit 0eb7303
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/librustc_resolve/diagnostics.rs
Expand Up @@ -274,6 +274,21 @@ on this topic:
http://doc.rust-lang.org/reference.html#use-declarations
"##

E0403: r##"
Some type parameters have the same name. Example of erroneous code:
```
fn foo<T, T>(s: T, u: T) {} // error: the name `T` is already used for a type
// parameter in this type parameter list
```
Please verify you didn't mispell the type parameters. Example:
```
fn foo<T, Y>(s: T, u: Y) {}
```
"##

}

register_diagnostics! {
Expand All @@ -284,7 +299,6 @@ register_diagnostics! {
E0258,
E0401, // can't use type parameters from outer function
E0402, // cannot use an outer type parameter in this context
E0403, // the name `{}` is already used
E0404, // is not a trait
E0405, // use of undeclared trait name
E0406, // undeclared associated type
Expand Down

0 comments on commit 0eb7303

Please sign in to comment.