From 14e3d26b8a19c56c2c2b2b99ee870a9002bb70e0 Mon Sep 17 00:00:00 2001
From: Guillaume Gomez <guillaume1.gomez@gmail.com>
Date: Sun, 28 Jun 2015 00:20:59 +0200
Subject: [PATCH] Add E0110 error explanation

---
 src/librustc/diagnostics.rs        | 21 +++++++++++++++++++--
 src/librustc_typeck/diagnostics.rs |  3 +++
 2 files changed, 22 insertions(+), 2 deletions(-)

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<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,
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<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!
 ```
 "##,