Skip to content

Commit

Permalink
option-if-let-else - pr comments
Browse files Browse the repository at this point in the history
  • Loading branch information
tnielens committed Aug 31, 2020
1 parent 0ad345d commit 94902bf
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion clippy_lints/src/utils/eager_or_lazy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,30 @@ fn identify_some_pure_patterns(expr: &Expr<'_>) -> bool {
},
_,
) => stmts.is_empty() && identify_some_pure_patterns(expr),
_ => false,
ExprKind::Box(..)
| ExprKind::Array(..)
| ExprKind::Call(..)
| ExprKind::MethodCall(..)
| ExprKind::Binary(..)
| ExprKind::Unary(..)
| ExprKind::Cast(..)
| ExprKind::Type(..)
| ExprKind::DropTemps(..)
| ExprKind::Loop(..)
| ExprKind::Match(..)
| ExprKind::Closure(..)
| ExprKind::Block(..)
| ExprKind::Assign(..)
| ExprKind::AssignOp(..)
| ExprKind::Index(..)
| ExprKind::Break(..)
| ExprKind::Continue(..)
| ExprKind::Ret(..)
| ExprKind::InlineAsm(..)
| ExprKind::LlvmInlineAsm(..)
| ExprKind::Repeat(..)
| ExprKind::Yield(..)
| ExprKind::Err => false,
}
}

Expand Down

0 comments on commit 94902bf

Please sign in to comment.