diff options
| author | bors <bors@rust-lang.org> | 2024-04-04 17:50:22 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-04-04 17:50:22 +0000 |
| commit | 9725c4a162502a02c1c67fdca6b797fe09b2b73c (patch) | |
| tree | 6c46b3f31a18f2773ae2683c588898c4fa4d9415 /clippy_lints/src/shadow.rs | |
| parent | 5a9e9b0e65d27bb294a5e13ca554878b43af6224 (diff) | |
| parent | bb023e90d8dfbdee714aa33cfa44b91753a99a03 (diff) | |
Auto merge of #12632 - flip1995:rustup, r=flip1995
Rustup r? `@ghost` changelog: none
Diffstat (limited to 'clippy_lints/src/shadow.rs')
| -rw-r--r-- | clippy_lints/src/shadow.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clippy_lints/src/shadow.rs b/clippy_lints/src/shadow.rs index 0fb7666dd9c..9db08acb03b 100644 --- a/clippy_lints/src/shadow.rs +++ b/clippy_lints/src/shadow.rs @@ -5,7 +5,7 @@ use rustc_data_structures::fx::FxHashMap; use rustc_hir::def::Res; use rustc_hir::def_id::LocalDefId; use rustc_hir::hir_id::ItemLocalId; -use rustc_hir::{Block, Body, BodyOwnerKind, Expr, ExprKind, HirId, Let, Node, Pat, PatKind, QPath, UnOp}; +use rustc_hir::{Block, Body, BodyOwnerKind, Expr, ExprKind, HirId, LetExpr, Node, Pat, PatKind, QPath, UnOp}; use rustc_lint::{LateContext, LateLintPass}; use rustc_session::impl_lint_pass; use rustc_span::{Span, Symbol}; @@ -238,10 +238,10 @@ fn find_init<'tcx>(cx: &LateContext<'tcx>, hir_id: HirId) -> Option<&'tcx Expr<' let init = match node { Node::Arm(_) | Node::Pat(_) => continue, Node::Expr(expr) => match expr.kind { - ExprKind::Match(e, _, _) | ExprKind::Let(&Let { init: e, .. }) => Some(e), + ExprKind::Match(e, _, _) | ExprKind::Let(&LetExpr { init: e, .. }) => Some(e), _ => None, }, - Node::Local(local) => local.init, + Node::LetStmt(local) => local.init, _ => None, }; return init; |
