rollup merge of #27644: AlisdairO/diagnostics194

As title :-)
Part of #24407.

r? @Manishearth

This will need merging with E0193, so probably want to delay any r+ until that goes in and I can merge myself.
This commit is contained in:
Alex Crichton 2015-08-11 22:11:33 -07:00
commit b5b8f1bd90

View File

@ -1840,6 +1840,22 @@ Since we know for certain that Wrapper<u32> 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<T> {
fn do_something(&self) -> T;
fn do_something_else<T: Clone>(&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