Skip to content

Commit

Permalink
Include bindings as machine applicable
Browse files Browse the repository at this point in the history
  • Loading branch information
camsteffen committed Nov 2, 2020
1 parent c0d1002 commit a6611de
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion clippy_lints/src/methods/unnecessary_lazy_eval.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ pub(super) fn lint<'tcx>(
let applicability = if body
.params
.iter()
.all(|param| matches!(param.pat.kind, hir::PatKind::Wild))
// bindings are checked to be unused above
.all(|param| matches!(param.pat.kind, hir::PatKind::Binding(..) | hir::PatKind::Wild))
{
Applicability::MachineApplicable
} else {
Expand Down

0 comments on commit a6611de

Please sign in to comment.