add applicability to lint name suggestion

This commit is contained in:
Andy Russell 2019-01-16 15:27:43 -05:00
parent 1b89724b48
commit 8fba46aa27
No known key found for this signature in database
GPG Key ID: BE2221033EDBC374

View File

@ -332,9 +332,12 @@ fn check_clippy_lint_names(cx: &LateContext<'_, '_>, items: &[NestedMetaItem]) {
// https://github.com/rust-lang/rust/pull/56992
CheckLintNameResult::NoLint(None) => (),
_ => {
db.span_suggestion(lint.span,
"lowercase the lint name",
name_lower);
db.span_suggestion_with_applicability(
lint.span,
"lowercase the lint name",
name_lower,
Applicability::MaybeIncorrect,
);
}
}
}