hir: Add non-optional hir_owner_nodes for real OwnerIds

This commit is contained in:
Vadim Petrochenkov 2024-01-25 19:34:49 +03:00
parent c0f49a9995
commit 7539054b56

View File

@ -93,9 +93,7 @@ impl Visitor<'_> for IdentVisitor<'_, '_> {
// reimplement it even if we wanted to
cx.tcx.opt_hir_node(hir_id)
} else {
let Some(owner) = cx.tcx.opt_hir_owner_nodes(hir_id.owner) else {
return;
};
let owner = cx.tcx.hir_owner_nodes(hir_id.owner);
owner.nodes.get(hir_id.local_id).copied().flatten().map(|p| p.node)
};
let Some(node) = node else {