1
Fork 0

Tweak signatures in rustc_middle::hir::map.

This commit is contained in:
Camille GILLOT 2022-10-25 15:07:56 +00:00
parent cc9b259b5e
commit 0ff1d1e122
3 changed files with 11 additions and 4 deletions

View file

@ -163,7 +163,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().expect_owner(owner) {
_ => match tcx.hir().owner(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),