//! 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.
///
/// ```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"
}
/// ```rust
/// let x = Mutex::new(0usize);
/// ```
-declare_lint! {
+declare_clippy_lint! {
pub MUTEX_INTEGER,
- Allow,
+ nursery,
"using a mutex for an integer type"
}