diff options
Diffstat (limited to 'compiler/rustc_lint/src/if_let_rescope.rs')
| -rw-r--r-- | compiler/rustc_lint/src/if_let_rescope.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_lint/src/if_let_rescope.rs b/compiler/rustc_lint/src/if_let_rescope.rs index 869dab6799d..c1aa95667da 100644 --- a/compiler/rustc_lint/src/if_let_rescope.rs +++ b/compiler/rustc_lint/src/if_let_rescope.rs @@ -95,7 +95,7 @@ pub(crate) struct IfLetRescope { } fn expr_parent_is_else(tcx: TyCtxt<'_>, hir_id: hir::HirId) -> bool { - let Some((_, hir::Node::Expr(expr))) = tcx.hir().parent_iter(hir_id).next() else { + let Some((_, hir::Node::Expr(expr))) = tcx.hir_parent_iter(hir_id).next() else { return false; }; let hir::ExprKind::If(_cond, _conseq, Some(alt)) = expr.kind else { return false }; @@ -103,7 +103,7 @@ fn expr_parent_is_else(tcx: TyCtxt<'_>, hir_id: hir::HirId) -> bool { } fn expr_parent_is_stmt(tcx: TyCtxt<'_>, hir_id: hir::HirId) -> bool { - let mut parents = tcx.hir().parent_iter(hir_id); + let mut parents = tcx.hir_parent_iter(hir_id); let stmt = match parents.next() { Some((_, hir::Node::Stmt(stmt))) => stmt, Some((_, hir::Node::Block(_) | hir::Node::Arm(_))) => return true, |
