Remember where a type was kept in MIR.
This commit is contained in:
parent
1974b6b68d
commit
e2387ad484
8 changed files with 46 additions and 14 deletions
|
@ -947,12 +947,12 @@ impl<'tcx> Visitor<'tcx> for CostChecker<'_, 'tcx> {
|
|||
return;
|
||||
};
|
||||
|
||||
let Some(&f_ty) = layout.field_tys.get(local) else {
|
||||
let Some(f_ty) = layout.field_tys.get(local) else {
|
||||
self.validation = Err("malformed MIR");
|
||||
return;
|
||||
};
|
||||
|
||||
f_ty
|
||||
f_ty.ty
|
||||
} else {
|
||||
let Some(f_ty) = substs.as_generator().prefix_tys().nth(f.index()) else {
|
||||
self.validation = Err("malformed MIR");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue