Skip to content

Commit e7e03b7

Browse files
Change from correctness to style and MaybeIncorrect instead of MachineApplicable
1 parent 292cb9b commit e7e03b7

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

clippy_lints/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1621,6 +1621,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
16211621
LintId::of(&misc_early::DUPLICATE_UNDERSCORE_ARGUMENT),
16221622
LintId::of(&misc_early::MIXED_CASE_HEX_LITERALS),
16231623
LintId::of(&misc_early::REDUNDANT_PATTERN),
1624+
LintId::of(&mut_mutex_lock::MUT_MUTEX_LOCK),
16241625
LintId::of(&mut_reference::UNNECESSARY_MUT_PASSED),
16251626
LintId::of(&neg_multiply::NEG_MULTIPLY),
16261627
LintId::of(&new_without_default::NEW_WITHOUT_DEFAULT),
@@ -1784,7 +1785,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
17841785
LintId::of(&misc::FLOAT_CMP),
17851786
LintId::of(&misc::MODULO_ONE),
17861787
LintId::of(&mut_key::MUTABLE_KEY_TYPE),
1787-
LintId::of(&mut_mutex_lock::MUT_MUTEX_LOCK),
17881788
LintId::of(&open_options::NONSENSICAL_OPEN_OPTIONS),
17891789
LintId::of(&option_env_unwrap::OPTION_ENV_UNWRAP),
17901790
LintId::of(&ptr::MUT_FROM_REF),

clippy_lints/src/mut_mutex_lock.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ declare_clippy_lint! {
3838
/// *value += 1;
3939
/// ```
4040
pub MUT_MUTEX_LOCK,
41-
correctness,
41+
style,
4242
"`&mut Mutex::lock` does unnecessary locking"
4343
}
4444

@@ -60,7 +60,7 @@ impl<'tcx> LateLintPass<'tcx> for MutMutexLock {
6060
"calling `&mut Mutex::lock` unnecessarily locks an exclusive (mutable) reference",
6161
"change this to",
6262
"get_mut".to_owned(),
63-
Applicability::MachineApplicable,
63+
Applicability::MaybeIncorrect,
6464
);
6565
}
6666
}

src/lintlist/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1504,7 +1504,7 @@ vec![
15041504
},
15051505
Lint {
15061506
name: "mut_mutex_lock",
1507-
group: "correctness",
1507+
group: "style",
15081508
desc: "`&mut Mutex::lock` does unnecessary locking",
15091509
deprecation: None,
15101510
module: "mut_mutex_lock",

0 commit comments

Comments
 (0)