add suggest for PatternsInWithoutBody

This commit is contained in:
Daiki Ihara 2020-11-30 23:24:08 +09:00
parent 463ce40428
commit acbebd81d4
3 changed files with 21 additions and 8 deletions

View file

@ -596,6 +596,9 @@ pub trait LintContext: Sized {
db.help("to document an item produced by a macro, \
the macro must produce the documentation as part of its expansion");
}
BuiltinLintDiagnostics::PatternsInFnsWithoutBody(span, ident) => {
db.span_suggestion(span, "remove `mut` from the parameter", ident.to_string(), Applicability::MachineApplicable);
}
}
// Rewrap `db`, and pass control to the user.
decorate(LintDiagnosticBuilder::new(db));