We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 32202cc + 9211883 commit 45087f3Copy full SHA for 45087f3
src/librustc_mir/tcx/mod.rs
@@ -79,6 +79,8 @@ impl<'tcx> LvalueTy<'tcx> {
79
adt_def.struct_variant().fields[field.index()].ty(tcx, substs),
80
ty::TyTuple(ref tys) =>
81
tys[field.index()],
82
+ ty::TyClosure(_, ref closure_substs) =>
83
+ closure_substs.upvar_tys[field.index()],
84
_ =>
85
tcx.sess.bug(&format!("cannot get field of type: `{:?}`", ty)),
86
},
0 commit comments