From 7786ee3c9240084ddb2b62d3f78cffce61462199 Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Wed, 27 Mar 2024 11:13:34 +0000 Subject: [PATCH] Remove a call-site to `primary_body_of` as it is only interested in the body id --- compiler/rustc_hir_typeck/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/rustc_hir_typeck/src/lib.rs b/compiler/rustc_hir_typeck/src/lib.rs index 55e86bbec1c..c135389ec98 100644 --- a/compiler/rustc_hir_typeck/src/lib.rs +++ b/compiler/rustc_hir_typeck/src/lib.rs @@ -106,7 +106,7 @@ fn has_typeck_results(tcx: TyCtxt<'_>, def_id: DefId) -> bool { } if let Some(def_id) = def_id.as_local() { - primary_body_of(tcx.hir_node_by_def_id(def_id)).is_some() + tcx.hir_node_by_def_id(def_id).body_id().is_some() } else { false }