Skip to content

Commit

Permalink
Add E0404 error explanation
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Jul 21, 2015
1 parent cd385cb commit bc79f20
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion src/librustc_resolve/diagnostics.rs
Expand Up @@ -290,6 +290,32 @@ fn foo<T, Y>(s: T, u: Y) {} // ok!
```
"##,

E0404: r##"
You tried to implement a non-trait object on an object. Example of erroneous
code:
```
struct Foo;
struct Bar;
impl Foo for Bar {} // error: `Foo` is not a trait
```
Please verify you didn't mispelled the trait's name or used the wrong object.
Example:
```
trait Foo {
// some functions
}
struct Bar;
impl Foo for Bar { // ok!
// functions implementation
}
```
"##,

E0405: r##"
You tried to implement an undefined trait on an object. Example of
erroneous code:
Expand Down Expand Up @@ -330,7 +356,6 @@ register_diagnostics! {
E0258,
E0401, // can't use type parameters from outer function
E0402, // cannot use an outer type parameter in this context
E0404, // is not a trait
E0406, // undeclared associated type
E0407, // method is not a member of trait
E0408, // variable from pattern #1 is not bound in pattern #
Expand Down

0 comments on commit bc79f20

Please sign in to comment.