Skip to content

Commit 6b682db

Browse files
author
Daniel Smith
committed
Convert the await holding lints to correctness
1 parent 85d7655 commit 6b682db

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

clippy_lints/src/await_holding_invalid.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ declare_clippy_lint! {
4545
/// }
4646
/// ```
4747
pub AWAIT_HOLDING_LOCK,
48-
pedantic,
48+
correctness,
4949
"Inside an async function, holding a MutexGuard while calling await"
5050
}
5151

@@ -126,7 +126,7 @@ declare_clippy_lint! {
126126
/// }
127127
/// ```
128128
pub AWAIT_HOLDING_REFCELL_REF,
129-
pedantic,
129+
correctness,
130130
"Inside an async function, holding a RefCell ref while calling await"
131131
}
132132

clippy_lints/src/lib.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -1173,8 +1173,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
11731173

11741174
store.register_group(true, "clippy::pedantic", Some("clippy_pedantic"), vec![
11751175
LintId::of(&attrs::INLINE_ALWAYS),
1176-
LintId::of(&await_holding_invalid::AWAIT_HOLDING_LOCK),
1177-
LintId::of(&await_holding_invalid::AWAIT_HOLDING_REFCELL_REF),
11781176
LintId::of(&bit_mask::VERBOSE_BIT_MASK),
11791177
LintId::of(&checked_conversions::CHECKED_CONVERSIONS),
11801178
LintId::of(&copies::MATCH_SAME_ARMS),
@@ -1273,6 +1271,8 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
12731271
LintId::of(&attrs::MISMATCHED_TARGET_OS),
12741272
LintId::of(&attrs::UNKNOWN_CLIPPY_LINTS),
12751273
LintId::of(&attrs::USELESS_ATTRIBUTE),
1274+
LintId::of(&await_holding_invalid::AWAIT_HOLDING_LOCK),
1275+
LintId::of(&await_holding_invalid::AWAIT_HOLDING_REFCELL_REF),
12761276
LintId::of(&bit_mask::BAD_BIT_MASK),
12771277
LintId::of(&bit_mask::INEFFECTIVE_BIT_MASK),
12781278
LintId::of(&blacklisted_name::BLACKLISTED_NAME),
@@ -1715,6 +1715,8 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
17151715
LintId::of(&attrs::DEPRECATED_SEMVER),
17161716
LintId::of(&attrs::MISMATCHED_TARGET_OS),
17171717
LintId::of(&attrs::USELESS_ATTRIBUTE),
1718+
LintId::of(&await_holding_invalid::AWAIT_HOLDING_LOCK),
1719+
LintId::of(&await_holding_invalid::AWAIT_HOLDING_REFCELL_REF),
17181720
LintId::of(&bit_mask::BAD_BIT_MASK),
17191721
LintId::of(&bit_mask::INEFFECTIVE_BIT_MASK),
17201722
LintId::of(&booleans::LOGIC_BUG),

src/lintlist/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,14 @@ pub static ref ALL_LINTS: Vec<Lint> = vec![
6161
},
6262
Lint {
6363
name: "await_holding_lock",
64-
group: "pedantic",
64+
group: "correctness",
6565
desc: "Inside an async function, holding a MutexGuard while calling await",
6666
deprecation: None,
6767
module: "await_holding_invalid",
6868
},
6969
Lint {
7070
name: "await_holding_refcell_ref",
71-
group: "pedantic",
71+
group: "correctness",
7272
desc: "Inside an async function, holding a RefCell ref while calling await",
7373
deprecation: None,
7474
module: "await_holding_invalid",

0 commit comments

Comments
 (0)