]> git.lizzy.rs Git - rust.git/blobdiff - clippy_lints/src/mutex_atomic.rs
Merge branch 'macro-use' into HEAD
[rust.git] / clippy_lints / src / mutex_atomic.rs
index 3a1ecfbefc783cde927904f8ed5efb54ca2e67e4..2448cd84d7c7008b35f510015c192f60424e9463 100644 (file)
@@ -3,10 +3,11 @@
 //! This lint is **warn** by default
 
 use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
+use rustc::{declare_lint, lint_array};
 use rustc::ty::{self, Ty};
 use rustc::hir::Expr;
 use syntax::ast;
-use utils::{match_type, paths, span_lint};
+use crate::utils::{match_type, paths, span_lint};
 
 /// **What it does:** Checks for usages of `Mutex<X>` where an atomic will do.
 ///
@@ -22,9 +23,9 @@
 /// ```rust
 /// let x = Mutex::new(&y);
 /// ```
-declare_lint! {
+declare_clippy_lint! {
     pub MUTEX_ATOMIC,
-    Warn,
+    perf,
     "using a mutex where an atomic value could be used instead"
 }
 
@@ -42,9 +43,9 @@
 /// ```rust
 /// let x = Mutex::new(0usize);
 /// ```
-declare_lint! {
+declare_clippy_lint! {
     pub MUTEX_INTEGER,
-    Allow,
+    nursery,
     "using a mutex for an integer type"
 }