Add E0110 error explanation

This commit is contained in:
Guillaume Gomez 2015-06-28 00:20:59 +02:00
parent d73cc56565
commit 14e3d26b8a
2 changed files with 22 additions and 2 deletions

View File

@ -361,13 +361,31 @@ http://doc.rust-lang.org/reference.html#ffi-attributes
"##,
E0109: r##"
You tried to give type parameter to a type which doesn't need it. Erroneous
You tried to give type parameter to a type which doesn't need it. Erroneous
code example:
```
type X = u32<i32>; // error: type parameters are not allowed on this type
```
Please check that you used the correct type and recheck its definition. Perhaps
it doesn't need the type parameter.
Example:
```
type X = u32; // ok!
```
"##,
E0110: r##"
You tried to give a lifetime parameter to a type which doesn't need it.
Erroneous code example:
```
type X = u32<'static>; // error: lifetime parameters are not allowed on
// this type
```
Please check you actually used the good type or check again its definition.
Example:
@ -1071,7 +1089,6 @@ register_diagnostics! {
E0017,
E0022,
E0038,
E0110,
E0134,
E0135,
E0136,

View File

@ -1010,12 +1010,15 @@ example:
```
type Foo<T> = u32; // error: type parameter `T` is unused
// or:
type Foo<A,B> = Box<A>; // error: type parameter `B` is unused
```
Please check you didn't write too many type parameters. Example:
```
type Foo = u32; // ok!
type Foo<A> = Box<A>; // ok!
```
"##,