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/read_zero_byte_vec.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/read_zero_byte_vec.rs')
| -rw-r--r-- | clippy_lints/src/read_zero_byte_vec.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clippy_lints/src/read_zero_byte_vec.rs b/clippy_lints/src/read_zero_byte_vec.rs index 0ebdb031d5a..7f4735c6a88 100644 --- a/clippy_lints/src/read_zero_byte_vec.rs +++ b/clippy_lints/src/read_zero_byte_vec.rs @@ -3,7 +3,7 @@ use clippy_utils::get_enclosing_block; use clippy_utils::higher::{get_vec_init_kind, VecInitKind}; use clippy_utils::source::snippet; -use hir::{Expr, ExprKind, HirId, Local, PatKind, PathSegment, QPath, StmtKind}; +use hir::{Expr, ExprKind, HirId, LetStmt, PatKind, PathSegment, QPath, StmtKind}; use rustc_errors::Applicability; use rustc_hir as hir; use rustc_hir::def::Res; @@ -57,7 +57,7 @@ impl<'tcx> LateLintPass<'tcx> for ReadZeroByteVec { } if let StmtKind::Let(local) = stmt.kind - && let Local { + && let LetStmt { pat, init: Some(init), .. } = local && let PatKind::Binding(_, id, ident, _) = pat.kind |
