Add missing instantiation of generator ty in validator

This commit is contained in:
Gary Guo 2023-08-18 16:19:26 +01:00
parent 907e431f93
commit eb4d6d9ff7

View file

@ -699,7 +699,7 @@ impl<'a, 'tcx> Visitor<'tcx> for TypeChecker<'a, 'tcx> {
return;
};
f_ty.ty
ty::EarlyBinder::bind(f_ty.ty).instantiate(self.tcx, args)
} else {
let Some(&f_ty) = args.as_generator().prefix_tys().get(f.index())
else {