Rollup merge of #65390 - GuillaumeGomez:long-err-explanation-E0576, r=matthewjasper,kinnison
Add long error explanation for E0576 Part of #61137.
This commit is contained in:
commit
e25720f106
@ -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.
|
||||
|
||||
@ -1925,7 +1950,6 @@ struct Foo<X = Box<Self>> {
|
||||
// E0427, merged into 530
|
||||
// E0467, removed
|
||||
// E0470, removed
|
||||
E0576,
|
||||
E0577,
|
||||
E0578,
|
||||
}
|
||||
|
@ -6,3 +6,4 @@ LL | <Dst as From<Self>>::Dst
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0576`.
|
||||
|
@ -6,3 +6,4 @@ LL | fn a(&self) -> <Self as A>::X;
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0576`.
|
||||
|
@ -6,3 +6,4 @@ LL | <<i32 as Copy>::foobar as Trait>::foo();
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0576`.
|
||||
|
@ -30,5 +30,5 @@ LL | let _ = |a, b: _| -> _ { 0 };
|
||||
|
||||
error: aborting due to 5 previous errors
|
||||
|
||||
Some errors have detailed explanations: E0282, E0412, E0425, E0433.
|
||||
Some errors have detailed explanations: E0282, E0412, E0425, E0433, E0576.
|
||||
For more information about an error, try `rustc --explain E0282`.
|
||||
|
@ -200,5 +200,5 @@ LL | <u8 as Dr>::X::N;
|
||||
|
||||
error: aborting due to 32 previous errors
|
||||
|
||||
Some errors have detailed explanations: E0223, E0433, E0575, E0599.
|
||||
Some errors have detailed explanations: E0223, E0433, E0575, E0576, E0599.
|
||||
For more information about an error, try `rustc --explain E0223`.
|
||||
|
Loading…
Reference in New Issue
Block a user