Skip to content

Conversation

nnethercote
Copy link
Contributor

@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 May 2, 2023
Copy link
Member

@compiler-errors compiler-errors left a comment

Choose a reason for hiding this comment

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

Not actually sure if this is a bandaid for an existing bug in -Zdrop-tracking-mir=yes

counter += 1;
tcx.mk_re_late_bound(current_depth, br)
}
ty::RePlaceholder(_) => r,
Copy link
Member

Choose a reason for hiding this comment

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

Hmm... I don't think we're supposed to leak placeholder types here. They should all be erased here...

Copy link
Contributor

Choose a reason for hiding this comment

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

We perform substitution with solver-provided substs, so we can have any region that is allowed within substs.
It may be interesting to do the fold before substitution: substs cannot contain ReErased, and unsubstituted bty can only contain ReErased.

Copy link
Member

Choose a reason for hiding this comment

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

oh, so this is a case where we had a late bound lifetime that was bound deeper than the generator itself. huh, ok, maybe this is fine then.

@compiler-errors
Copy link
Member

Since I'm a bit busy to investigate the fix and/or minimize the repro for a more detailed understanding,

r? @cjgillot

@rustbot rustbot assigned cjgillot and unassigned compiler-errors May 2, 2023
@cjgillot cjgillot 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 May 13, 2023
@nnethercote
Copy link
Contributor Author

Looks like this one fell through the cracks. @cjgillot, sounds like you think the fix is ok as written. But you marked it as waiting-on-author. So now I'm confused -- is the code ok as written?

@cjgillot
Copy link
Contributor

My suggestion is to perform the fold before substitution. The assertion would be correct then.

@bors
Copy link
Collaborator

bors commented Sep 23, 2023

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

@nnethercote
Copy link
Contributor Author

@cjgillot: I see you fixed this in #107421, which means this PR can be closed.

@nnethercote nnethercote deleted the fix-110941 branch May 22, 2025 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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: unexpected region: RePlaceholder(Placeholder with mir drop tracking
5 participants