Skip to content

Commit

Permalink
Remove a call-site to primary_body_of as it is only interested in t…
Browse files Browse the repository at this point in the history
…he body id
  • Loading branch information
oli-obk committed Mar 27, 2024
1 parent d0eb9c8 commit 7786ee3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_hir_typeck/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 7786ee3

Please sign in to comment.