Skip to content

Commit

Permalink
hir: Add non-optional hir_owner_nodes for real OwnerIds
Browse files Browse the repository at this point in the history
  • Loading branch information
petrochenkov committed Jan 30, 2024
1 parent c0f49a9 commit 7539054
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions clippy_lints/src/min_ident_chars.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 7539054

Please sign in to comment.