forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make sure that predicates with unmentioned bound vars are still consi…
…dered global in the old solver
- Loading branch information
1 parent
adda05f
commit 32294fc
Showing
5 changed files
with
47 additions
and
32 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// check-pass | ||
|
||
trait Foo { | ||
type Assoc; | ||
|
||
fn do_it(_: &Self::Assoc) | ||
where | ||
for<'a> Self: Baz<'a>; | ||
} | ||
|
||
trait Baz<'a>: Foo {} | ||
|
||
impl Foo for () { | ||
type Assoc = Inherent; | ||
|
||
// Ensure that the `for<'a> Self: Baz<'a>` predicate, which has | ||
// a supertrait `for<'a> Self: Foo`, does not cause us to fail | ||
// to normalize `Self::Assoc`. | ||
fn do_it(x: &Self::Assoc) | ||
where | ||
for<'a> Self: Baz<'a>, | ||
{ | ||
x.inherent(); | ||
} | ||
} | ||
|
||
struct Inherent; | ||
impl Inherent { | ||
fn inherent(&self) {} | ||
} | ||
|
||
fn main() {} |