We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a408e76 commit 4931f45Copy full SHA for 4931f45
clippy_lints/src/manual_let_else.rs
@@ -68,9 +68,11 @@ impl_lint_pass!(ManualLetElse => [MANUAL_LET_ELSE]);
68
69
impl<'tcx> LateLintPass<'tcx> for ManualLetElse {
70
fn check_stmt(&mut self, cx: &LateContext<'_>, stmt: &'tcx Stmt<'tcx>) {
71
- if self.msrv.meets(msrvs::LET_ELSE) &&
72
- !in_external_macro(cx.sess(), stmt.span) &&
73
- let StmtKind::Local(local) = stmt.kind &&
+ if !self.msrv.meets(msrvs::LET_ELSE) || in_external_macro(cx.sess(), stmt.span) {
+ return;
+ }
74
+
75
+ if let StmtKind::Local(local) = stmt.kind &&
76
let Some(init) = local.init &&
77
local.els.is_none() &&
78
local.ty.is_none() &&
0 commit comments