Auto merge of #120346 - petrochenkov:ownodes, r=oli-obk
hir: Refactor getters for owner nodes
This commit is contained in:
commit
d53ddcd8bb
49 changed files with 918 additions and 925 deletions
|
@ -2555,7 +2555,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
|
|||
add_lt_suggs,
|
||||
new_lt: &new_lt,
|
||||
};
|
||||
match self.tcx.hir().expect_owner(lifetime_scope) {
|
||||
match self.tcx.expect_hir_owner_node(lifetime_scope) {
|
||||
hir::OwnerNode::Item(i) => visitor.visit_item(i),
|
||||
hir::OwnerNode::ForeignItem(i) => visitor.visit_foreign_item(i),
|
||||
hir::OwnerNode::ImplItem(i) => visitor.visit_impl_item(i),
|
||||
|
|
|
@ -443,7 +443,7 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
|
|||
if let hir::OwnerNode::Item(Item {
|
||||
kind: ItemKind::Impl(hir::Impl { self_ty, .. }),
|
||||
..
|
||||
}) = tcx.hir().owner(impl_did)
|
||||
}) = tcx.hir_owner_node(impl_did)
|
||||
{
|
||||
Some((impl_item.ident, self_ty))
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue