Add long error explanation for E0576
This commit is contained in:
parent
d6e4028a0d
commit
aa733dacdf
@ -1797,6 +1797,31 @@ impl Age for u8 {
|
||||
```
|
||||
"##,
|
||||
|
||||
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.
|
||||
|
||||
@ -1924,7 +1949,6 @@ struct Foo<X = Box<Self>> {
|
||||
// E0427, merged into 530
|
||||
// E0467, removed
|
||||
// E0470, removed
|
||||
E0576,
|
||||
E0577,
|
||||
E0578,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user