Skip to content
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

Do not overwrite lifetime binders for another HirId. #101454

Merged
merged 2 commits into from
Sep 28, 2022

Conversation

cjgillot
Copy link
Contributor

@cjgillot cjgillot commented Sep 5, 2022

This PR makes higher-ranked bounds in where clauses a bit more principled.
We used to conflate for<'a> T: Trait with (for<'a> T): Trait.
This PR separates both binders.

This caused issued with fn types, which have their own binder, causing us to overwrite the predicates's binders with fn's binders, ICEing.

Fixes #98594

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Sep 5, 2022
@rust-highfive
Copy link
Collaborator

r? @estebank

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 5, 2022
@@ -0,0 +1,18 @@
error[E0277]: the trait bound `for<'b> for<'b> fn(&'b ()): Foo` is not satisfied
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The diagnostic looks a bit silly. I don't know why we are choosing a 'b for the inner param.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bit of a shame.

@bors
Copy link
Contributor

bors commented Sep 27, 2022

☔ The latest upstream changes (presumably #102306) made this pull request unmergeable. Please resolve the merge conflicts.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@estebank
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Sep 28, 2022

📌 Commit dd69ce3 has been approved by estebank

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 28, 2022
@bors
Copy link
Contributor

bors commented Sep 28, 2022

⌛ Testing commit dd69ce3 with merge 307dd93...

@bors
Copy link
Contributor

bors commented Sep 28, 2022

☀️ Test successful - checks-actions
Approved by: estebank
Pushing 307dd93 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Sep 28, 2022
@bors bors merged commit 307dd93 into rust-lang:master Sep 28, 2022
@rustbot rustbot added this to the 1.66.0 milestone Sep 28, 2022
@bors bors mentioned this pull request Sep 28, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (307dd93): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

This benchmark run did not return any relevant results for this metric.

Cycles

This benchmark run did not return any relevant results for this metric.

@cjgillot cjgillot deleted the concat-binders branch October 1, 2022 17:48
Aaron1011 pushed a commit to Aaron1011/rust that referenced this pull request Jan 6, 2023
Do not overwrite lifetime binders for another HirId.

This PR makes higher-ranked bounds in where clauses a bit more principled.
We used to conflate `for<'a> T: Trait` with `(for<'a> T): Trait`.
This PR separates both binders.

This caused issued with fn types, which have their own binder, causing us to overwrite the predicates's binders with `fn`'s binders, ICEing.

Fixes rust-lang#98594
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

-Zverbose hrlt pretty printing ICE
7 participants