]> git.lizzy.rs Git - rust.git/blobdiff - clippy_lints/src/formatting.rs
Merge branch 'macro-use' into HEAD
[rust.git] / clippy_lints / src / formatting.rs
index e016fa3d595a755814b2b807ccfab1ef8508b4cc..784461c23ee8ae1b3b5eaef04bccb6a4c8f9f7dd 100644 (file)
@@ -1,6 +1,7 @@
 use rustc::lint::*;
+use rustc::{declare_lint, lint_array};
 use syntax::ast;
-use utils::{differing_macro_contexts, in_macro, snippet_opt, span_note_and_lint};
+use crate::utils::{differing_macro_contexts, in_macro, snippet_opt, span_note_and_lint};
 use syntax::ptr::P;
 
 /// **What it does:** Checks for use of the non-existent `=*`, `=!` and `=-`
@@ -15,9 +16,9 @@
 /// ```rust,ignore
 /// a =- 42; // confusing, should it be `a -= 42` or `a = -42`?
 /// ```
-declare_lint! {
+declare_clippy_lint! {
     pub SUSPICIOUS_ASSIGNMENT_FORMATTING,
-    Warn,
+    style,
     "suspicious formatting of `*=`, `-=` or `!=`"
 }
 
@@ -41,9 +42,9 @@
 /// if bar { // this is the `else` block of the previous `if`, but should it be?
 /// }
 /// ```
-declare_lint! {
+declare_clippy_lint! {
     pub SUSPICIOUS_ELSE_FORMATTING,
-    Warn,
+    style,
     "suspicious formatting of `else if`"
 }
 
@@ -61,9 +62,9 @@
 ///     -4, -5, -6
 /// ];
 /// ```
-declare_lint! {
+declare_clippy_lint! {
     pub POSSIBLE_MISSING_COMMA,
-    Warn,
+    correctness,
     "possible missing comma in array"
 }