-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Normalize obligations for closure confirmation
- Loading branch information
Showing
17 changed files
with
263 additions
and
87 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,19 @@ | ||
// check-pass | ||
|
||
#![feature(generic_associated_types)] | ||
|
||
trait Trait { | ||
type Assoc<'a>; | ||
} | ||
|
||
fn f<T: Trait>(_: T, _: impl Fn(T::Assoc<'_>)) {} | ||
|
||
struct Type; | ||
|
||
impl Trait for Type { | ||
type Assoc<'a> = (); | ||
} | ||
|
||
fn main() { | ||
f(Type, |_|()); | ||
} |
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
20 changes: 0 additions & 20 deletions
20
src/test/ui/higher-rank-trait-bounds/normalize-under-binder/issue-70120.stderr
This file was deleted.
Oops, something went wrong.
92 changes: 92 additions & 0 deletions
92
src/test/ui/higher-rank-trait-bounds/normalize-under-binder/issue-71955.migrate.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,92 @@ | ||
error: implementation of `Parser` is not general enough | ||
--> $DIR/issue-71955.rs:52:5 | ||
| | ||
LL | foo(bar, "string", |s| s.len() == 5); | ||
| ^^^ implementation of `Parser` is not general enough | ||
| | ||
= note: `for<'a> fn(&'a str) -> (&'a str, &'a str) {bar}` must implement `Parser<'0>`, for any lifetime `'0`... | ||
= note: ...but it actually implements `Parser<'1>`, for some specific lifetime `'1` | ||
|
||
error: implementation of `Parser` is not general enough | ||
--> $DIR/issue-71955.rs:52:5 | ||
| | ||
LL | foo(bar, "string", |s| s.len() == 5); | ||
| ^^^ implementation of `Parser` is not general enough | ||
| | ||
= note: `for<'a> fn(&'a str) -> (&'a str, &'a str) {bar}` must implement `Parser<'0>`, for any lifetime `'0`... | ||
= note: ...but it actually implements `Parser<'1>`, for some specific lifetime `'1` | ||
|
||
error: implementation of `Parser` is not general enough | ||
--> $DIR/issue-71955.rs:52:5 | ||
| | ||
LL | foo(bar, "string", |s| s.len() == 5); | ||
| ^^^ implementation of `Parser` is not general enough | ||
| | ||
= note: `for<'a> fn(&'a str) -> (&'a str, &'a str) {bar}` must implement `Parser<'0>`, for any lifetime `'0`... | ||
= note: ...but it actually implements `Parser<'1>`, for some specific lifetime `'1` | ||
|
||
error: implementation of `Parser` is not general enough | ||
--> $DIR/issue-71955.rs:52:5 | ||
| | ||
LL | foo(bar, "string", |s| s.len() == 5); | ||
| ^^^ implementation of `Parser` is not general enough | ||
| | ||
= note: `for<'a> fn(&'a str) -> (&'a str, &'a str) {bar}` must implement `Parser<'0>`, for any lifetime `'0`... | ||
= note: ...but it actually implements `Parser<'1>`, for some specific lifetime `'1` | ||
|
||
error: implementation of `Parser` is not general enough | ||
--> $DIR/issue-71955.rs:52:5 | ||
| | ||
LL | foo(bar, "string", |s| s.len() == 5); | ||
| ^^^ implementation of `Parser` is not general enough | ||
| | ||
= note: `for<'a> fn(&'a str) -> (&'a str, &'a str) {bar}` must implement `Parser<'0>`, for any lifetime `'0`... | ||
= note: ...but it actually implements `Parser<'1>`, for some specific lifetime `'1` | ||
|
||
error: implementation of `Parser` is not general enough | ||
--> $DIR/issue-71955.rs:58:5 | ||
| | ||
LL | foo(baz, "string", |s| s.0.len() == 5); | ||
| ^^^ implementation of `Parser` is not general enough | ||
| | ||
= note: `for<'a> fn(&'a str) -> (&'a str, Wrapper<'a>) {baz}` must implement `Parser<'0>`, for any lifetime `'0`... | ||
= note: ...but it actually implements `Parser<'1>`, for some specific lifetime `'1` | ||
|
||
error: implementation of `Parser` is not general enough | ||
--> $DIR/issue-71955.rs:58:5 | ||
| | ||
LL | foo(baz, "string", |s| s.0.len() == 5); | ||
| ^^^ implementation of `Parser` is not general enough | ||
| | ||
= note: `for<'a> fn(&'a str) -> (&'a str, Wrapper<'a>) {baz}` must implement `Parser<'0>`, for any lifetime `'0`... | ||
= note: ...but it actually implements `Parser<'1>`, for some specific lifetime `'1` | ||
|
||
error: implementation of `Parser` is not general enough | ||
--> $DIR/issue-71955.rs:58:5 | ||
| | ||
LL | foo(baz, "string", |s| s.0.len() == 5); | ||
| ^^^ implementation of `Parser` is not general enough | ||
| | ||
= note: `for<'a> fn(&'a str) -> (&'a str, Wrapper<'a>) {baz}` must implement `Parser<'0>`, for any lifetime `'0`... | ||
= note: ...but it actually implements `Parser<'1>`, for some specific lifetime `'1` | ||
|
||
error: implementation of `Parser` is not general enough | ||
--> $DIR/issue-71955.rs:58:5 | ||
| | ||
LL | foo(baz, "string", |s| s.0.len() == 5); | ||
| ^^^ implementation of `Parser` is not general enough | ||
| | ||
= note: `for<'a> fn(&'a str) -> (&'a str, Wrapper<'a>) {baz}` must implement `Parser<'0>`, for any lifetime `'0`... | ||
= note: ...but it actually implements `Parser<'1>`, for some specific lifetime `'1` | ||
|
||
error: implementation of `Parser` is not general enough | ||
--> $DIR/issue-71955.rs:58:5 | ||
| | ||
LL | foo(baz, "string", |s| s.0.len() == 5); | ||
| ^^^ implementation of `Parser` is not general enough | ||
| | ||
= note: `for<'a> fn(&'a str) -> (&'a str, Wrapper<'a>) {baz}` must implement `Parser<'0>`, for any lifetime `'0`... | ||
= note: ...but it actually implements `Parser<'1>`, for some specific lifetime `'1` | ||
|
||
error: aborting due to 10 previous errors | ||
|
8 changes: 8 additions & 0 deletions
8
src/test/ui/higher-rank-trait-bounds/normalize-under-binder/issue-71955.nll.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,8 @@ | ||
error: fatal error triggered by #[rustc_error] | ||
--> $DIR/issue-71955.rs:42:1 | ||
| | ||
LL | fn main() { | ||
| ^^^^^^^^^ | ||
|
||
error: aborting due to previous error | ||
|
Oops, something went wrong.