Move methods from Map to TyCtxt, part 3.

Continuing the work from #137162.

Every method gains a `hir_` prefix.
This commit is contained in:
Nicholas Nethercote 2025-02-21 07:54:35 +11:00
parent 43c2b0086a
commit 806be25fc9
105 changed files with 243 additions and 273 deletions

View file

@ -127,7 +127,7 @@ fn get_owner_return_paths(
def_id: LocalDefId,
) -> Option<(LocalDefId, ReturnsVisitor<'_>)> {
let hir_id = tcx.local_def_id_to_hir_id(def_id);
let parent_id = tcx.hir().get_parent_item(hir_id).def_id;
let parent_id = tcx.hir_get_parent_item(hir_id).def_id;
tcx.hir_node_by_def_id(parent_id).body_id().map(|body_id| {
let body = tcx.hir_body(body_id);
let mut visitor = ReturnsVisitor::default();