MIR: Support closure up-vars in LvalueTy::projection_ty()
This commit is contained in:
parent
b12a3582b1
commit
9211883e54
@ -78,6 +78,8 @@ impl<'tcx> LvalueTy<'tcx> {
|
||||
adt_def.struct_variant().fields[field.index()].ty(tcx, substs),
|
||||
ty::TyTuple(ref tys) =>
|
||||
tys[field.index()],
|
||||
ty::TyClosure(_, ref closure_substs) =>
|
||||
closure_substs.upvar_tys[field.index()],
|
||||
_ =>
|
||||
tcx.sess.bug(&format!("cannot get field of type: `{:?}`", ty)),
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user