diff --git a/src/librustc_ty/needs_drop.rs b/src/librustc_ty/needs_drop.rs index cbbb2aa19fd83..f8149cdce4d30 100644 --- a/src/librustc_ty/needs_drop.rs +++ b/src/librustc_ty/needs_drop.rs @@ -99,13 +99,13 @@ where } } - ty::Generator(def_id, substs, _) => { + ty::Generator(_, substs, _) => { let substs = substs.as_generator(); - for upvar_ty in substs.upvar_tys(def_id, tcx) { + for upvar_ty in substs.upvar_tys() { queue_type(self, upvar_ty); } - let witness = substs.witness(def_id, tcx); + let witness = substs.witness(); let interior_tys = match &witness.kind { ty::GeneratorWitness(tys) => tcx.erase_late_bound_regions(tys), _ => bug!(),