-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Canonicalize free regions from inputs as placeholders in root univ #155487
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
ShoyuVanilla
wants to merge
1
commit into
rust-lang:main
Choose a base branch
from
ShoyuVanilla:canon-ph
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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: 9 additions & 9 deletions
18
tests/ui/async-await/higher-ranked-auto-trait-10.assumptions.stderr
This file contains hidden or 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,21 +1,21 @@ | ||
| error: implementation of `Foo` is not general enough | ||
| error[E0308]: mismatched types | ||
| --> $DIR/higher-ranked-auto-trait-10.rs:32:5 | ||
| | | ||
| LL | Box::new(async move { get_foo(x).await }) | ||
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `Foo` is not general enough | ||
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ one type is more general than the other | ||
| | | ||
| = note: `Foo<'1>` would have to be implemented for the type `&'0 str`, for any two lifetimes `'0` and `'1`... | ||
| = note: ...but `Foo<'2>` is actually implemented for the type `&'2 str`, for some specific lifetime `'2` | ||
| = note: expected enum `Result<&_, _>` | ||
| found enum `Result<&_, _>` | ||
|
|
||
| error: implementation of `Foo` is not general enough | ||
| error: implementation of `Send` is not general enough | ||
| --> $DIR/higher-ranked-auto-trait-10.rs:32:5 | ||
| | | ||
| LL | Box::new(async move { get_foo(x).await }) | ||
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `Foo` is not general enough | ||
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `Send` is not general enough | ||
| | | ||
| = note: `Foo<'1>` would have to be implemented for the type `&'0 str`, for any two lifetimes `'0` and `'1`... | ||
| = note: ...but `Foo<'2>` is actually implemented for the type `&'2 str`, for some specific lifetime `'2` | ||
| = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` | ||
| = note: `Send` would have to be implemented for the type `&str` | ||
| = note: ...but `Send` is actually implemented for the type `&'0 str`, for some specific lifetime `'0` | ||
|
|
||
| error: aborting due to 2 previous errors | ||
|
|
||
| For more information about this error, try `rustc --explain E0308`. |
18 changes: 9 additions & 9 deletions
18
tests/ui/async-await/higher-ranked-auto-trait-10.no_assumptions.stderr
This file contains hidden or 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,21 +1,21 @@ | ||
| error: implementation of `Foo` is not general enough | ||
| error[E0308]: mismatched types | ||
| --> $DIR/higher-ranked-auto-trait-10.rs:32:5 | ||
| | | ||
| LL | Box::new(async move { get_foo(x).await }) | ||
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `Foo` is not general enough | ||
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ one type is more general than the other | ||
| | | ||
| = note: `Foo<'1>` would have to be implemented for the type `&'0 str`, for any two lifetimes `'0` and `'1`... | ||
| = note: ...but `Foo<'2>` is actually implemented for the type `&'2 str`, for some specific lifetime `'2` | ||
| = note: expected enum `Result<&_, _>` | ||
| found enum `Result<&_, _>` | ||
|
|
||
| error: implementation of `Foo` is not general enough | ||
| error: implementation of `Send` is not general enough | ||
| --> $DIR/higher-ranked-auto-trait-10.rs:32:5 | ||
| | | ||
| LL | Box::new(async move { get_foo(x).await }) | ||
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `Foo` is not general enough | ||
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `Send` is not general enough | ||
| | | ||
| = note: `Foo<'1>` would have to be implemented for the type `&'0 str`, for any two lifetimes `'0` and `'1`... | ||
| = note: ...but `Foo<'2>` is actually implemented for the type `&'2 str`, for some specific lifetime `'2` | ||
| = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` | ||
| = note: `Send` would have to be implemented for the type `&str` | ||
| = note: ...but `Send` is actually implemented for the type `&'0 str`, for some specific lifetime `'0` | ||
|
|
||
| error: aborting due to 2 previous errors | ||
|
|
||
| For more information about this error, try `rustc --explain E0308`. |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
4 changes: 2 additions & 2 deletions
4
tests/ui/generic-associated-types/must-prove-where-clauses-on-norm.current.stderr
This file contains hidden or 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,10 +1,10 @@ | ||
| error: higher-ranked lifetime error | ||
| error: lifetime bound not satisfied | ||
| --> $DIR/must-prove-where-clauses-on-norm.rs:23:61 | ||
| | | ||
| LL | let func: for<'a, 'b> fn((), &'b str) -> &'static str = foo::<()>; | ||
| | ^^^^^^^^^ | ||
| | | ||
| = note: could not normalize `for<'b> fn(<() as Trait>::Assoc<'_, 'b>, &'b str) -> &str` | ||
| = note: this is a known limitation that will be removed in the future (see issue #100013 <https://github.com/rust-lang/rust/issues/100013> for more information) | ||
|
|
||
| error: aborting due to 1 previous error | ||
|
|
This file contains hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have lots of those
...but it actually implements X for some specific lifetime '?x->...but it actually implements X for some specific lifetimediagnostic drifts due to the canonicalized region being placeholders rather than region vars.I think this is somewhat regressive. Would it make sense to fix them somehow?
View changes since the review