-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Destructuring assingment in closure causes "broken MIR in DefId [...] can't project out of PlaceTy [...]" #96299
Comments
Is this still reproducible? |
Yes, unfortunately, the problem persists with this setup:
|
Ok, it looks like this is actually an incremental compilation issue which only appears with --edition=2021, very interesting 😄
EDIT: actually it only needs edition=2021 and is unrelated to incremental compilation 🙃 |
Assigning priority as discussed in the Zulip thread of the Prioritization Working Group. @rustbot label -I-prioritize +P-medium |
…-aman Fix precise field capture of univariant enums When constructing a MIR from a THIR field expression, introduce an additional downcast projection before accessing a field of an enum. When rebasing a place builder on top of a captured place, account for the fact that a single HIR enum field projection corresponds to two MIR projection elements: a downcast element and a field element. Fixes rust-lang#95271. Fixes rust-lang#96299. Fixes rust-lang#96512. Fixes rust-lang#97378. r? `@nikomatsakis` `@arora-aman`
Code
Notes:
_x
with_
fixes the problemMeta
rustc --version --verbose
:Error output
Backtrace
The text was updated successfully, but these errors were encountered: