diff --git a/compiler/rustc_hir_analysis/src/check/check.rs b/compiler/rustc_hir_analysis/src/check/check.rs index 917360ab8119e..3208602fd4900 100644 --- a/compiler/rustc_hir_analysis/src/check/check.rs +++ b/compiler/rustc_hir_analysis/src/check/check.rs @@ -2194,7 +2194,9 @@ fn opaque_type_cycle_error(tcx: TyCtxt<'_>, opaque_def_id: LocalDefId) -> ErrorG ty::Alias(ty::AliasTy { kind: ty::Opaque { def_id: def }, .. }) => { self.opaques.push(def); } - ty::Closure(def_id, ..) | ty::Coroutine(def_id, ..) => { + ty::Closure(def_id, ..) + | ty::CoroutineClosure(def_id, ..) + | ty::Coroutine(def_id, ..) => { self.closures.push(def_id); t.super_visit_with(self); }