Skip to content

Commit

Permalink
add applicability to lint name suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
euclio committed Jan 16, 2019
1 parent 1b89724 commit 8fba46a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions clippy_lints/src/attrs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
);
}
}
}
Expand Down

0 comments on commit 8fba46a

Please sign in to comment.