-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use the normalizing param-env always in check_type_bounds
- Loading branch information
1 parent
df871fb
commit 69563f0
Showing
4 changed files
with
164 additions
and
133 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
18 changes: 18 additions & 0 deletions
18
tests/ui/generic-associated-types/assume-gat-normalization-for-nested-goals.rs
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,18 @@ | ||
// check-pass | ||
|
||
#![feature(associated_type_defaults)] | ||
|
||
trait Foo { | ||
type Bar<T>: Baz<Self> = i32; | ||
// We should be able to prove that `i32: Baz<Self>` because of | ||
// the impl below, which requires that `Self::Bar<()>: Eq<i32>` | ||
// which is true, because we assume `for<T> Self::Bar<T> = i32`. | ||
} | ||
|
||
trait Baz<T: ?Sized> {} | ||
impl<T: Foo + ?Sized> Baz<T> for i32 where T::Bar<()>: Eq<i32> {} | ||
|
||
trait Eq<T> {} | ||
impl<T> Eq<T> for T {} | ||
|
||
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
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