]> git.lizzy.rs Git - rust.git/blobdiff - clippy_lints/src/precedence.rs
Merge branch 'macro-use' into HEAD
[rust.git] / clippy_lints / src / precedence.rs
index 5d56a927bc0f7ed2e14d755be85d6e41ad719237..76ea9c5ade609ea95a73ade1166961340ebdd904 100644 (file)
@@ -1,7 +1,8 @@
 use rustc::lint::*;
+use rustc::{declare_lint, lint_array};
 use syntax::ast::*;
 use syntax::codemap::Spanned;
-use utils::{in_macro, snippet, span_lint_and_sugg};
+use crate::utils::{in_macro, snippet, span_lint_and_sugg};
 
 /// **What it does:** Checks for operations where precedence may be unclear
 /// and suggests to add parentheses. Currently it catches the following:
@@ -20,9 +21,9 @@
 /// **Example:**
 /// * `1 << 2 + 3` equals 32, while `(1 << 2) + 3` equals 7
 /// * `-1i32.abs()` equals -1, while `(-1i32).abs()` equals 1
-declare_lint! {
+declare_clippy_lint! {
     pub PRECEDENCE,
-    Warn,
+    complexity,
     "operations where precedence may be unclear"
 }