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.
1 parent b12a358 commit 9211883Copy full SHA for 9211883
src/librustc_mir/tcx/mod.rs
@@ -78,6 +78,8 @@ impl<'tcx> LvalueTy<'tcx> {
78
adt_def.struct_variant().fields[field.index()].ty(tcx, substs),
79
ty::TyTuple(ref tys) =>
80
tys[field.index()],
81
+ ty::TyClosure(_, ref closure_substs) =>
82
+ closure_substs.upvar_tys[field.index()],
83
_ =>
84
tcx.sess.bug(&format!("cannot get field of type: `{:?}`", ty)),
85
},
0 commit comments