We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
else_if_without_else
1 parent d15ec0f commit 441500bCopy full SHA for 441500b
clippy_lints/src/else_if_without_else.rs
@@ -50,12 +50,9 @@ declare_lint_pass!(ElseIfWithoutElse => [ELSE_IF_WITHOUT_ELSE]);
50
51
impl EarlyLintPass for ElseIfWithoutElse {
52
fn check_expr(&mut self, cx: &EarlyContext<'_>, item: &Expr) {
53
- if in_external_macro(cx.sess(), item.span) {
54
- return;
55
- }
56
-
57
if let ExprKind::If(_, _, Some(ref els)) = item.kind
58
&& let ExprKind::If(_, _, None) = els.kind
+ && !in_external_macro(cx.sess(), item.span)
59
{
60
span_lint_and_help(
61
cx,
0 commit comments