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

Account for binders correctly when adding default RPITIT method assumption #108583

Conversation

compiler-errors
Copy link
Member

As of #108203, we install extra projection predicates into the param-env of a default trait method when it has return-position impl Trait (or is async).

The implementation didn't account for the fact that it's walking into and out of binders, so we just need to shift all the debruijn indices accordingly when constructing the projection predicates.

Fixes #108579

r? types

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Feb 28, 2023
@spastorino
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Mar 6, 2023

📌 Commit b7e0ca9 has been approved by spastorino

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 Mar 6, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 7, 2023
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#108460 (migrate `rustc_hir_analysis` to session diagnostic [Part Two])
 - rust-lang#108581 (Add a new config flag, dist.include-mingw-linker.)
 - rust-lang#108583 (Account for binders correctly when adding default RPITIT method assumption)
 - rust-lang#108783 (Sync rustc_codegen_gcc 2023/03/04)
 - rust-lang#108793 (Append to existing `PYTHONPATH` in compiletest instead of overwriting)
 - rust-lang#108822 (Remove references to PassManagerBuilder)
 - rust-lang#108866 (Force to use the stage 2 compiler  when config.download_rustc is set)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 6363588 into rust-lang:master Mar 8, 2023
@rustbot rustbot added this to the 1.70.0 milestone Mar 8, 2023
@compiler-errors compiler-errors deleted the rpitit-default-method-with-nested-rpitits branch August 11, 2023 20:18
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: Induced by '_ bound on associated type in RPITIT.
4 participants