Auto merge of #120346 - petrochenkov:ownodes, r=oli-obk

hir: Refactor getters for owner nodes
This commit is contained in:
bors 2024-01-31 05:37:49 +00:00
commit d53ddcd8bb
49 changed files with 918 additions and 925 deletions

View file

@ -181,7 +181,7 @@ fn shallow_lint_levels_on(tcx: TyCtxt<'_>, owner: hir::OwnerId) -> ShallowLintLe
// Otherwise, we need to visit the attributes in source code order, so we fetch HIR and do
// a standard visit.
// FIXME(#102522) Just iterate on attrs once that iteration order matches HIR's.
_ => match tcx.hir().owner(owner) {
_ => match tcx.hir_owner_node(owner) {
hir::OwnerNode::Item(item) => levels.visit_item(item),
hir::OwnerNode::ForeignItem(item) => levels.visit_foreign_item(item),
hir::OwnerNode::TraitItem(item) => levels.visit_trait_item(item),