Skip to content

Commit 94902bf

Browse files
committed
option-if-let-else - pr comments
1 parent 0ad345d commit 94902bf

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

clippy_lints/src/utils/eager_or_lazy.rs

+24-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,30 @@ fn identify_some_pure_patterns(expr: &Expr<'_>) -> bool {
5252
},
5353
_,
5454
) => stmts.is_empty() && identify_some_pure_patterns(expr),
55-
_ => false,
55+
ExprKind::Box(..)
56+
| ExprKind::Array(..)
57+
| ExprKind::Call(..)
58+
| ExprKind::MethodCall(..)
59+
| ExprKind::Binary(..)
60+
| ExprKind::Unary(..)
61+
| ExprKind::Cast(..)
62+
| ExprKind::Type(..)
63+
| ExprKind::DropTemps(..)
64+
| ExprKind::Loop(..)
65+
| ExprKind::Match(..)
66+
| ExprKind::Closure(..)
67+
| ExprKind::Block(..)
68+
| ExprKind::Assign(..)
69+
| ExprKind::AssignOp(..)
70+
| ExprKind::Index(..)
71+
| ExprKind::Break(..)
72+
| ExprKind::Continue(..)
73+
| ExprKind::Ret(..)
74+
| ExprKind::InlineAsm(..)
75+
| ExprKind::LlvmInlineAsm(..)
76+
| ExprKind::Repeat(..)
77+
| ExprKind::Yield(..)
78+
| ExprKind::Err => false,
5679
}
5780
}
5881

0 commit comments

Comments
 (0)