forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#59118 - seanmonstar:alias-where-self-ice, r…
…=alexreg rustc: fix ICE when trait alias has bare Self Fixes rust-lang#59029
- Loading branch information
Showing
4 changed files
with
29 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#![feature(trait_alias)] | ||
|
||
trait Svc<Req> { type Res; } | ||
|
||
trait MkSvc<Target, Req> = Svc<Target> where Self::Res: Svc<Req>; | ||
//~^ ERROR associated type `Res` not found for `Self` | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
error[E0220]: associated type `Res` not found for `Self` | ||
--> $DIR/issue-59029-1.rs:5:46 | ||
| | ||
LL | trait MkSvc<Target, Req> = Svc<Target> where Self::Res: Svc<Req>; | ||
| ^^^^^^^^^ associated type `Res` not found | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0220`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// run-pass | ||
#![feature(trait_alias)] | ||
|
||
trait Svc<Req> { type Res; } | ||
|
||
trait MkSvc<Target, Req> = Svc<Target> where <Self as Svc<Target>>::Res: Svc<Req>; | ||
|
||
fn main() {} |