hir: Remove hir::Map::{opt_parent_id,parent_id,get_parent,find_parent}

This commit is contained in:
Vadim Petrochenkov 2024-02-09 23:58:36 +03:00
parent e46e3e7107
commit b07283815b
78 changed files with 233 additions and 318 deletions

View file

@ -214,8 +214,7 @@ fn is_single_call_in_arm<'tcx>(
drop_expr: &'tcx Expr<'_>,
) -> bool {
if arg.can_have_side_effects() {
let parent_node = cx.tcx.hir().find_parent(drop_expr.hir_id);
if let Some(Node::Arm(Arm { body, .. })) = &parent_node {
if let Node::Arm(Arm { body, .. }) = cx.tcx.parent_hir_node(drop_expr.hir_id) {
return body.hir_id == drop_expr.hir_id;
}
}