Remember where a type was kept in MIR.

This commit is contained in:
Camille GILLOT 2022-09-11 17:24:53 +02:00
parent 1974b6b68d
commit e2387ad484
8 changed files with 46 additions and 14 deletions

View file

@ -643,7 +643,7 @@ fn generator_layout<'tcx>(
let promoted_layouts = ineligible_locals
.iter()
.map(|local| subst_field(info.field_tys[local]))
.map(|local| subst_field(info.field_tys[local].ty))
.map(|ty| tcx.mk_maybe_uninit(ty))
.map(|ty| cx.layout_of(ty));
let prefix_layouts = substs
@ -713,7 +713,7 @@ fn generator_layout<'tcx>(
Assigned(_) => bug!("assignment does not match variant"),
Ineligible(_) => false,
})
.map(|local| subst_field(info.field_tys[*local]));
.map(|local| subst_field(info.field_tys[*local].ty));
let mut variant = univariant_uninterned(
cx,