rust/compiler/rustc_mir_build
Dylan DPC fd76e0eee0
Rollup merge of #97325 - tmiasko:capture-enum-field, r=arora-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 #95271.
Fixes #96299.
Fixes #96512.
Fixes #97378.

r? ``@nikomatsakis`` ``@arora-aman``
2022-06-07 17:25:43 +02:00
..
src Rollup merge of #97325 - tmiasko:capture-enum-field, r=arora-aman 2022-06-07 17:25:43 +02:00
Cargo.toml Migrate to 2021 2021-09-20 22:21:42 -04:00