diff --git a/src/librustc/diagnostics.rs b/src/librustc/diagnostics.rs index b15bcb7b758..8d51674ab13 100644 --- a/src/librustc/diagnostics.rs +++ b/src/librustc/diagnostics.rs @@ -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; // 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, diff --git a/src/librustc_typeck/diagnostics.rs b/src/librustc_typeck/diagnostics.rs index bf2913c83a1..d4977c5d394 100644 --- a/src/librustc_typeck/diagnostics.rs +++ b/src/librustc_typeck/diagnostics.rs @@ -1010,12 +1010,15 @@ example: ``` type Foo = u32; // error: type parameter `T` is unused +// or: +type Foo = Box; // error: type parameter `B` is unused ``` Please check you didn't write too many type parameters. Example: ``` type Foo = u32; // ok! +type Foo = Box; // ok! ``` "##,