-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Fix an assertion failure in bind_generator_hidden_types_above
.
#111085
Conversation
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.
Not actually sure if this is a bandaid for an existing bug in -Zdrop-tracking-mir=yes
@@ -3016,6 +3016,7 @@ fn bind_generator_hidden_types_above<'tcx>( | |||
counter += 1; | |||
tcx.mk_re_late_bound(current_depth, br) | |||
} | |||
ty::RePlaceholder(_) => r, |
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.
Hmm... I don't think we're supposed to leak placeholder types here. They should all be erased here...
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 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.
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.
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.
Since I'm a bit busy to investigate the fix and/or minimize the repro for a more detailed understanding, r? @cjgillot |
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? |
My suggestion is to perform the fold before substitution. The assertion would be correct then. |
☔ The latest upstream changes (presumably #107421) made this pull request unmergeable. Please resolve the merge conflicts. |
Fixes #110941.
r? @compiler-errors