Skip to content

Commit

Permalink
Change from correctness to style and MaybeIncorrect instead of Machin…
Browse files Browse the repository at this point in the history
…eApplicable
  • Loading branch information
FrancisMurillo committed Oct 25, 2020
1 parent 292cb9b commit e7e03b7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion clippy_lints/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::MIXED_CASE_HEX_LITERALS),
LintId::of(&misc_early::REDUNDANT_PATTERN),
LintId::of(&mut_mutex_lock::MUT_MUTEX_LOCK),
LintId::of(&mut_reference::UNNECESSARY_MUT_PASSED),
LintId::of(&neg_multiply::NEG_MULTIPLY),
LintId::of(&new_without_default::NEW_WITHOUT_DEFAULT),
Expand Down Expand Up @@ -1784,7 +1785,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
LintId::of(&misc::FLOAT_CMP),
LintId::of(&misc::MODULO_ONE),
LintId::of(&mut_key::MUTABLE_KEY_TYPE),
LintId::of(&mut_mutex_lock::MUT_MUTEX_LOCK),
LintId::of(&open_options::NONSENSICAL_OPEN_OPTIONS),
LintId::of(&option_env_unwrap::OPTION_ENV_UNWRAP),
LintId::of(&ptr::MUT_FROM_REF),
Expand Down
4 changes: 2 additions & 2 deletions clippy_lints/src/mut_mutex_lock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ declare_clippy_lint! {
/// *value += 1;
/// ```
pub MUT_MUTEX_LOCK,
correctness,
style,
"`&mut Mutex::lock` does unnecessary locking"
}

Expand All @@ -60,7 +60,7 @@ impl<'tcx> LateLintPass<'tcx> for MutMutexLock {
"calling `&mut Mutex::lock` unnecessarily locks an exclusive (mutable) reference",
"change this to",
"get_mut".to_owned(),
Applicability::MachineApplicable,
Applicability::MaybeIncorrect,
);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/lintlist/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1504,7 +1504,7 @@ vec![
},
Lint {
name: "mut_mutex_lock",
group: "correctness",
group: "style",
desc: "`&mut Mutex::lock` does unnecessary locking",
deprecation: None,
module: "mut_mutex_lock",
Expand Down

0 comments on commit e7e03b7

Please sign in to comment.