about summary refs log tree commit diff
diff options
context:
space:
mode:
authorOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2024-03-27 11:13:34 +0000
committerOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2024-03-27 11:13:34 +0000
commit7786ee3c9240084ddb2b62d3f78cffce61462199 (patch)
treea5063ad8e3da71ab654d713ae88d7faec65c59c3
parentd0eb9c86f1ec1d2f6c2c5c09abb31d2b3d3e7069 (diff)
downloadrust-7786ee3c9240084ddb2b62d3f78cffce61462199.tar.gz
rust-7786ee3c9240084ddb2b62d3f78cffce61462199.zip
Remove a call-site to `primary_body_of` as it is only interested in the body id
-rw-r--r--compiler/rustc_hir_typeck/src/lib.rs2
1 files changed, 1 insertions, 1 deletions
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
     }