From d88dfd25225ccebffd913021a48d22b27d611292 Mon Sep 17 00:00:00 2001 From: Miguel Guarniz Date: Fri, 29 Apr 2022 12:22:40 -0400 Subject: [PATCH] use hir_module_items in check_mod_item_types query Signed-off-by: Miguel Guarniz --- compiler/rustc_typeck/src/check/check.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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;