Auto merge of #79414 - sasurau4:feature/add-suggestion-for-pattern-in-fns-without-body, r=matthewjasper
Add suggestion for PATTERNS_IN_FNS_WITHOUT_BODY ## Overview Fix #78927
This commit is contained in:
commit
c97f11af7b
4 changed files with 22 additions and 9 deletions
|
@ -597,6 +597,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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue