Skip to content

Commit

Permalink
Add long error explanation for E0576
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Oct 23, 2019
1 parent d6e4028 commit aa733da
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion src/librustc_resolve/error_codes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1797,6 +1797,31 @@ let _: <u8 as Age>::Empire; // ok!
```
"##,

E0576: r##"
An associated item wasn't found in the given type.
Erroneous code example:
```compile_fail,E0576
trait Hello {
type Who;
fn hello() -> <Self as Hello>::You; // error!
}
```
In this example, we tried to use the non-existent associated type `You` of the
`Hello` trait. To fix this error, use an existing associated type:
```
trait Hello {
type Who;
fn hello() -> <Self as Hello>::Who; // ok!
}
```
"##,

E0603: r##"
A private item was used outside its scope.
Expand Down Expand Up @@ -1924,7 +1949,6 @@ struct Foo<X = Box<Self>> {
// E0427, merged into 530
// E0467, removed
// E0470, removed
E0576,
E0577,
E0578,
}

0 comments on commit aa733da

Please sign in to comment.