diff --git a/src/librustc_typeck/diagnostics.rs b/src/librustc_typeck/diagnostics.rs index ed04fde463c..93f5fb4a537 100644 --- a/src/librustc_typeck/diagnostics.rs +++ b/src/librustc_typeck/diagnostics.rs @@ -2109,6 +2109,41 @@ E0380: r##" Default impls are only allowed for traits with no methods or associated items. For more information see the [opt-in builtin traits RFC](https://github.com/rust -lang/rfcs/blob/master/text/0019-opt-in-builtin-traits.md). +"##, + +E0392: r##" +This error indicates that a type parameter has been declared but not actually +used. + +Here is an example that demonstrates the error: + +``` +enum Foo { + Bar +} +``` + +The first way to fix this error is by removing the type parameter, as +shown below: + +``` +enum Foo { + Bar +} +``` + +The second method is to actually make use of the type parameter: + +``` +enum Foo { + Bar(T) +} +``` + +See the 'Type Parameters' section of the reference for more details +on this topic: + +http://doc.rust-lang.org/reference.html#type-parameters-1 "## } @@ -2211,7 +2246,6 @@ register_diagnostics! { E0390, // only a single inherent implementation marked with // `#[lang = \"{}\"]` is allowed for the `{}` primitive E0391, // unsupported cyclic reference between types/traits detected - E0392, // parameter `{}` is never used E0393, // the type parameter `{}` must be explicitly specified in an object // type because its default value `{}` references the type `Self`" E0399, // trait items need to be implemented because the associated