Auto merge of #29817 - michaelwoerister:mir-ty-closure-fields, r=nikomatsakis
Add a missing case in LvalueTy::projection_ty() that popped up earlier today. cc @rust-lang/compiler @nikomatsakis
This commit is contained in:
commit
45087f36ce
@ -79,6 +79,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