-
Notifications
You must be signed in to change notification settings - Fork 12.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Normalize trait ref before orphan check
- Loading branch information
Showing
15 changed files
with
340 additions
and
54 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
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
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
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,2 @@ | ||
pub trait Trait0<T, U, V> {} | ||
pub trait Trait1<T, U> {} |
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,24 @@ | ||
// Projections can cover type parameters if they normalize to a (local) type that covers them. | ||
// This ensures that we don't perform an overly strict check on | ||
// projections like in closed PR #100555 which did a syntactic | ||
// check for type parameters in projections without normalizing | ||
// first which would've lead to real-word regressions. | ||
|
||
// check-pass | ||
// revisions: classic next | ||
//[next] compile-flags: -Ztrait-solver=next | ||
|
||
// aux-crate:foreign=parametrized-trait.rs | ||
// edition:2021 | ||
|
||
trait Project { type Output; } | ||
|
||
impl<T> Project for T { | ||
type Output = Local; | ||
} | ||
|
||
struct Local; | ||
|
||
impl<T> foreign::Trait1<Local, T> for <T as Project>::Output {} | ||
|
||
fn main() {} |
Oops, something went wrong.