Include bindings as machine applicable

This commit is contained in:
Cameron Steffen 2020-11-02 12:55:05 -06:00
parent c0d1002d93
commit a6611de75a

View File

@ -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 {