Skip to content

Commit a6611de

Browse files
committed
Include bindings as machine applicable
1 parent c0d1002 commit a6611de

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

clippy_lints/src/methods/unnecessary_lazy_eval.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ pub(super) fn lint<'tcx>(
3535
let applicability = if body
3636
.params
3737
.iter()
38-
.all(|param| matches!(param.pat.kind, hir::PatKind::Wild))
38+
// bindings are checked to be unused above
39+
.all(|param| matches!(param.pat.kind, hir::PatKind::Binding(..) | hir::PatKind::Wild))
3940
{
4041
Applicability::MachineApplicable
4142
} else {

0 commit comments

Comments
 (0)