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

Liberate late bound regions when collecting GAT substs in wfcheck #93227

Merged
merged 1 commit into from
Jan 24, 2022

Conversation

compiler-errors
Copy link
Member

The issue here is that the GATSubstCollector does not currently do anything wrt Binders, so the GAT substs it copies out have escaping late bound regions when it walks through types like for<'x> fn() -> Self::Gat<'x>.

I made that visitor call liberate_late_bound_regions, not sure if that's the right thing here or we need to do something else to replace these bound vars with placeholders. I'm not familiar with other code doing anything similar.. But the issue is indeed no longer ICEing.

Fixes #92954

r? @jackh726
since you last touched this code, feel free to reassign

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jan 23, 2022
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 23, 2022
@marmeladema
Copy link
Contributor

@compiler-errors I believe you commited a binary test file by mistake?

@compiler-errors
Copy link
Member Author

hahaha yep! let me fix that.

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 23, 2022
@jackh726
Copy link
Member

Is Self: 'c required for this test with this? If so, I don't think this is the right fix.

@compiler-errors
Copy link
Member Author

@jackh726 No the Self: 'c bound is not required and was just from the example I minimized.

@compiler-errors
Copy link
Member Author

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 23, 2022
@jackh726
Copy link
Member

Great. @bors r+ rollup

@bors
Copy link
Contributor

bors commented Jan 23, 2022

📌 Commit 4a74ace has been approved by jackh726

@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 Jan 23, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 23, 2022
…askrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#91526 (rustc_lint: Some early linting refactorings)
 - rust-lang#92555 (Implement RFC 3151: Scoped threads.)
 - rust-lang#93213 (Fix `let_chains` and `if_let_guard` feature flags)
 - rust-lang#93219 (Add preliminary support for inline assembly for msp430.)
 - rust-lang#93226 (Normalize field access types during borrowck)
 - rust-lang#93227 (Liberate late bound regions when collecting GAT substs in wfcheck)
 - rust-lang#93229 (Remove DiagnosticBuilder.quiet)
 - rust-lang#93234 (rustc_mir_itertools: Avoid needless `collect` with itertools)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 8810af8 into rust-lang:master Jan 24, 2022
@rustbot rustbot added this to the 1.60.0 milestone Jan 24, 2022
@compiler-errors compiler-errors deleted the gat-hrtb-wfcheck branch April 7, 2022 04:34
eggyal added a commit to eggyal/rust that referenced this pull request Jun 18, 2022
rust-lang#93227 liberated late bound regions when collecting GAT substs in wfcheck.  It should simply skip late bound regions instead.

r? @compiler-errors
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Jun 19, 2022
…lding, r=jackh726

Skip late bound regions in GATSubstCollector

rust-lang#93227 liberated late bound regions when collecting GAT substs in wfcheck.  It should simply skip late bound regions instead.

r? `@compiler-errors`
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Jun 19, 2022
…lding, r=jackh726

Skip late bound regions in GATSubstCollector

rust-lang#93227 liberated late bound regions when collecting GAT substs in wfcheck.  It should simply skip late bound regions instead.

r? ``@compiler-errors``
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

ICE with GAT + HRTB
6 participants