Skip to content

Commit d88dfd2

Browse files
committed
use hir_module_items in check_mod_item_types query
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
1 parent 422dd3b commit d88dfd2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

compiler/rustc_typeck/src/check/check.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1451,7 +1451,11 @@ pub(super) fn check_type_params_are_used<'tcx>(
14511451
}
14521452

14531453
pub(super) fn check_mod_item_types(tcx: TyCtxt<'_>, module_def_id: LocalDefId) {
1454-
tcx.hir().visit_item_likes_in_module(module_def_id, &mut CheckItemTypesVisitor { tcx });
1454+
let module = tcx.hir_module_items(module_def_id);
1455+
for id in module.items() {
1456+
let item = tcx.hir().item(id);
1457+
check_item_type(tcx, item)
1458+
}
14551459
}
14561460

14571461
pub(super) use wfcheck::check_item_well_formed;

0 commit comments

Comments
 (0)