mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-14 23:32:43 +00:00
Change from correctness to style and MaybeIncorrect instead of MachineApplicable
This commit is contained in:
parent
292cb9bfb6
commit
e7e03b7912
3 changed files with 4 additions and 4 deletions
|
@ -1621,6 +1621,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
|
||||||
LintId::of(&misc_early::DUPLICATE_UNDERSCORE_ARGUMENT),
|
LintId::of(&misc_early::DUPLICATE_UNDERSCORE_ARGUMENT),
|
||||||
LintId::of(&misc_early::MIXED_CASE_HEX_LITERALS),
|
LintId::of(&misc_early::MIXED_CASE_HEX_LITERALS),
|
||||||
LintId::of(&misc_early::REDUNDANT_PATTERN),
|
LintId::of(&misc_early::REDUNDANT_PATTERN),
|
||||||
|
LintId::of(&mut_mutex_lock::MUT_MUTEX_LOCK),
|
||||||
LintId::of(&mut_reference::UNNECESSARY_MUT_PASSED),
|
LintId::of(&mut_reference::UNNECESSARY_MUT_PASSED),
|
||||||
LintId::of(&neg_multiply::NEG_MULTIPLY),
|
LintId::of(&neg_multiply::NEG_MULTIPLY),
|
||||||
LintId::of(&new_without_default::NEW_WITHOUT_DEFAULT),
|
LintId::of(&new_without_default::NEW_WITHOUT_DEFAULT),
|
||||||
|
@ -1784,7 +1785,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
|
||||||
LintId::of(&misc::FLOAT_CMP),
|
LintId::of(&misc::FLOAT_CMP),
|
||||||
LintId::of(&misc::MODULO_ONE),
|
LintId::of(&misc::MODULO_ONE),
|
||||||
LintId::of(&mut_key::MUTABLE_KEY_TYPE),
|
LintId::of(&mut_key::MUTABLE_KEY_TYPE),
|
||||||
LintId::of(&mut_mutex_lock::MUT_MUTEX_LOCK),
|
|
||||||
LintId::of(&open_options::NONSENSICAL_OPEN_OPTIONS),
|
LintId::of(&open_options::NONSENSICAL_OPEN_OPTIONS),
|
||||||
LintId::of(&option_env_unwrap::OPTION_ENV_UNWRAP),
|
LintId::of(&option_env_unwrap::OPTION_ENV_UNWRAP),
|
||||||
LintId::of(&ptr::MUT_FROM_REF),
|
LintId::of(&ptr::MUT_FROM_REF),
|
||||||
|
|
|
@ -38,7 +38,7 @@ declare_clippy_lint! {
|
||||||
/// *value += 1;
|
/// *value += 1;
|
||||||
/// ```
|
/// ```
|
||||||
pub MUT_MUTEX_LOCK,
|
pub MUT_MUTEX_LOCK,
|
||||||
correctness,
|
style,
|
||||||
"`&mut Mutex::lock` does unnecessary locking"
|
"`&mut Mutex::lock` does unnecessary locking"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ impl<'tcx> LateLintPass<'tcx> for MutMutexLock {
|
||||||
"calling `&mut Mutex::lock` unnecessarily locks an exclusive (mutable) reference",
|
"calling `&mut Mutex::lock` unnecessarily locks an exclusive (mutable) reference",
|
||||||
"change this to",
|
"change this to",
|
||||||
"get_mut".to_owned(),
|
"get_mut".to_owned(),
|
||||||
Applicability::MachineApplicable,
|
Applicability::MaybeIncorrect,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1504,7 +1504,7 @@ vec![
|
||||||
},
|
},
|
||||||
Lint {
|
Lint {
|
||||||
name: "mut_mutex_lock",
|
name: "mut_mutex_lock",
|
||||||
group: "correctness",
|
group: "style",
|
||||||
desc: "`&mut Mutex::lock` does unnecessary locking",
|
desc: "`&mut Mutex::lock` does unnecessary locking",
|
||||||
deprecation: None,
|
deprecation: None,
|
||||||
module: "mut_mutex_lock",
|
module: "mut_mutex_lock",
|
||||||
|
|
Loading…
Reference in a new issue