-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only use normalize_param_env when normalizing predicate in check_item…
…_bounds
- Loading branch information
1 parent
ff0b4b6
commit 97c9d8f
Showing
8 changed files
with
73 additions
and
9 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
2 changes: 1 addition & 1 deletion
2
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// check-pass | ||
// known-bug: #117606 | ||
|
||
#![feature(associated_type_defaults)] | ||
|
||
|
24 changes: 24 additions & 0 deletions
24
tests/ui/generic-associated-types/assume-gat-normalization-for-nested-goals.stderr
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 @@ | ||
error[E0277]: the trait bound `<Self as Foo>::Bar<()>: Eq<i32>` is not satisfied | ||
--> $DIR/assume-gat-normalization-for-nested-goals.rs:6:30 | ||
| | ||
LL | type Bar<T>: Baz<Self> = i32; | ||
| ^^^ the trait `Eq<i32>` is not implemented for `<Self as Foo>::Bar<()>` | ||
| | ||
note: required for `i32` to implement `Baz<Self>` | ||
--> $DIR/assume-gat-normalization-for-nested-goals.rs:13:23 | ||
| | ||
LL | impl<T: Foo + ?Sized> Baz<T> for i32 where T::Bar<()>: Eq<i32> {} | ||
| ^^^^^^ ^^^ ------- unsatisfied trait bound introduced here | ||
note: required by a bound in `Foo::Bar` | ||
--> $DIR/assume-gat-normalization-for-nested-goals.rs:6:18 | ||
| | ||
LL | type Bar<T>: Baz<Self> = i32; | ||
| ^^^^^^^^^ required by this bound in `Foo::Bar` | ||
help: consider further restricting the associated type | ||
| | ||
LL | trait Foo where <Self as Foo>::Bar<()>: Eq<i32> { | ||
| +++++++++++++++++++++++++++++++++++++ | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0277`. |
20 changes: 20 additions & 0 deletions
20
tests/ui/generic-associated-types/higher-ranked-self-impl-requirement.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,20 @@ | ||
// check-pass | ||
|
||
trait Database: for<'r> HasValueRef<'r, Database = Self> {} | ||
|
||
trait HasValueRef<'r> { | ||
type Database: Database; | ||
} | ||
|
||
struct Any; | ||
|
||
impl Database for Any {} | ||
|
||
impl<'r> HasValueRef<'r> for Any { | ||
// Make sure we don't have issues when the GAT assumption | ||
// `<Any as HasValue<'r>>::Database = Any` isn't universally | ||
// parameterized over `'r`. | ||
type Database = Any; | ||
} | ||
|
||
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
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