Skip to content

Commit

Permalink
Rollup merge of rust-lang#65390 - GuillaumeGomez:long-err-explanation…
Browse files Browse the repository at this point in the history
…-E0576, r=matthewjasper,kinnison

Add long error explanation for E0576

Part of rust-lang#61137.
  • Loading branch information
Centril authored Oct 25, 2019
2 parents a302155 + 530d709 commit e25720f
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 3 deletions.
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 @@ -1925,7 +1950,6 @@ struct Foo<X = Box<Self>> {
// E0427, merged into 530
// E0467, removed
// E0470, removed
E0576,
E0577,
E0578,
}
1 change: 1 addition & 0 deletions src/test/ui/issues/issue-19883.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
1 change: 1 addition & 0 deletions src/test/ui/issues/issue-22037.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
1 change: 1 addition & 0 deletions src/test/ui/issues/issue-22384.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
2 changes: 1 addition & 1 deletion src/test/ui/type/type-path-err-node-types.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
2 changes: 1 addition & 1 deletion src/test/ui/ufcs/ufcs-partially-resolved.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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`.

0 comments on commit e25720f

Please sign in to comment.