Skip to content

Commit

Permalink
Add E0220 error explanation
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Jul 8, 2015
1 parent d165867 commit c01c1fd
Showing 1 changed file with 28 additions and 3 deletions.
31 changes: 28 additions & 3 deletions src/librustc_typeck/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1551,7 +1551,8 @@ impl Foo for Bar {
"##,

E0191: r##"
You have to specify all the associated types. Erroneous code example:
Trait objects need to have all associated types specified. Erroneous code
example:
```
trait Trait {
Expand All @@ -1563,7 +1564,7 @@ type Foo = Trait; // error: the value of the associated type `Bar` (from
```
Please verify you specified all associated types of the trait or that you
used the good trait. Example:
used the right trait. Example:
```
trait Trait {
Expand Down Expand Up @@ -1855,6 +1856,31 @@ extern "rust-intrinsic" {
```
"##,

E0220: r##"
You used an associated type which isn't defined in the trait.
Erroneous code example:
```
trait Trait {
type Bar;
}
type Foo = Trait<F=i32>; // error: associated type `F` not found for
// `Trait`
```
Please verify you used the good trait or you didn't mispelled the
associated type name. Example:
```
trait Trait {
type Bar;
}
type Foo = Trait<Bar=i32>; // ok!
```
"##,

E0243: r##"
This error indicates that not enough type parameters were found in a type or
trait.
Expand Down Expand Up @@ -2115,7 +2141,6 @@ register_diagnostics! {
E0217, // ambiguous associated type, defined in multiple supertraits
E0218, // no associated type defined
E0219, // associated type defined in higher-ranked supertrait
E0220, // associated type not found for type parameter
E0221, // ambiguous associated type in bounds
//E0222, // Error code E0045 (variadic function must have C calling
// convention) duplicate
Expand Down

0 comments on commit c01c1fd

Please sign in to comment.