diff --git a/src/librustc_typeck/diagnostics.rs b/src/librustc_typeck/diagnostics.rs index bd4e4fc31107c..e7f3c780fac07 100644 --- a/src/librustc_typeck/diagnostics.rs +++ b/src/librustc_typeck/diagnostics.rs @@ -1840,6 +1840,22 @@ Since we know for certain that Wrapper implements Clone, there's no reason to also specify it in a `where` clause. "##, +E0194: r##" +A type parameter was declared which shadows an existing one. An example of this +error: + +``` +trait Foo { + fn do_something(&self) -> T; + fn do_something_else(&self, bar: T); +} +``` + +In this example, the trait `Foo` and the trait method `do_something_else` both +define a type parameter `T`. This is not allowed: if the method wishes to +define a type parameter, it must use a different name for it. +"##, + E0195: r##" Your method's lifetime parameters do not match the trait declaration. Erroneous code example: @@ -2595,7 +2611,6 @@ register_diagnostics! { E0188, // can not cast a immutable reference to a mutable pointer E0189, // deprecated: can only cast a boxed pointer to a boxed object E0190, // deprecated: can only cast a &-pointer to an &-object - E0194, E0196, // cannot determine a type for this closure E0203, // type parameter has more than one relaxed default bound, // and only one is supported