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 a81c2648dc
commit c2d75cff47
51 changed files with 96 additions and 108 deletions

View File

@@ -178,7 +178,7 @@ pub fn first_node_in_macro(cx: &LateContext<'_>, node: &impl HirNode) -> Option<
// get the parent node, possibly skipping over a statement
// if the parent is not found, it is sensible to return `Some(root)`
let hir = cx.tcx.hir();
let mut parent_iter = hir.parent_iter(node.hir_id());
let mut parent_iter = cx.tcx.hir_parent_iter(node.hir_id());
let (parent_id, _) = match parent_iter.next() {
None => return Some(ExpnId::root()),
Some((_, Node::Stmt(_))) => match parent_iter.next() {