about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAndy Russell <arussell123@gmail.com>2019-01-16 15:27:43 -0500
committerAndy Russell <arussell123@gmail.com>2019-01-16 15:29:37 -0500
commit8fba46aa275247b8cd2e5fcb08ba1fe0c3de745e (patch)
tree7d717840ff118970918f5551cd94dfb74edeb6d4
parent1b89724b4889aef631b40d52c0943bdc28e04d1d (diff)
downloadrust-8fba46aa275247b8cd2e5fcb08ba1fe0c3de745e.tar.gz
rust-8fba46aa275247b8cd2e5fcb08ba1fe0c3de745e.zip
add applicability to lint name suggestion
-rw-r--r--clippy_lints/src/attrs.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/clippy_lints/src/attrs.rs b/clippy_lints/src/attrs.rs
index a3f2cc6a23b..693d6d487e2 100644
--- a/clippy_lints/src/attrs.rs
+++ b/clippy_lints/src/attrs.rs
@@ -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,
+                                    );
                                 }
                             }
                         }