mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-30 04:56:25 +03:00
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:
@@ -79,6 +79,8 @@ pub fn projection_ty(self,
|
||||
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)),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user