about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--compiler/rustc_typeck/src/check/check.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/rustc_typeck/src/check/check.rs b/compiler/rustc_typeck/src/check/check.rs
index 6a4c0c2091e..eaec8d2e370 100644
--- a/compiler/rustc_typeck/src/check/check.rs
+++ b/compiler/rustc_typeck/src/check/check.rs
@@ -1451,7 +1451,11 @@ pub(super) fn check_type_params_are_used<'tcx>(
 }
 
 pub(super) fn check_mod_item_types(tcx: TyCtxt<'_>, module_def_id: LocalDefId) {
-    tcx.hir().visit_item_likes_in_module(module_def_id, &mut CheckItemTypesVisitor { tcx });
+    let module = tcx.hir_module_items(module_def_id);
+    for id in module.items() {
+        let item = tcx.hir().item(id);
+        check_item_type(tcx, item)
+    }
 }
 
 pub(super) use wfcheck::check_item_well_formed;