Skip to content

Commit d8c6bce

Browse files
author
Daniel Smith
committed
Convert the await holding lints to correctness
1 parent ee20eba commit d8c6bce

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

clippy_lints/src/await_holding_invalid.rs

Lines changed: 2 additions & 2 deletions
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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1190,8 +1190,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
11901190

11911191
store.register_group(true, "clippy::pedantic", Some("clippy_pedantic"), vec![
11921192
LintId::of(&attrs::INLINE_ALWAYS),
1193-
LintId::of(&await_holding_invalid::AWAIT_HOLDING_LOCK),
1194-
LintId::of(&await_holding_invalid::AWAIT_HOLDING_REFCELL_REF),
11951193
LintId::of(&bit_mask::VERBOSE_BIT_MASK),
11961194
LintId::of(&checked_conversions::CHECKED_CONVERSIONS),
11971195
LintId::of(&copies::MATCH_SAME_ARMS),
@@ -1290,6 +1288,8 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
12901288
LintId::of(&attrs::MISMATCHED_TARGET_OS),
12911289
LintId::of(&attrs::UNKNOWN_CLIPPY_LINTS),
12921290
LintId::of(&attrs::USELESS_ATTRIBUTE),
1291+
LintId::of(&await_holding_invalid::AWAIT_HOLDING_LOCK),
1292+
LintId::of(&await_holding_invalid::AWAIT_HOLDING_REFCELL_REF),
12931293
LintId::of(&bit_mask::BAD_BIT_MASK),
12941294
LintId::of(&bit_mask::INEFFECTIVE_BIT_MASK),
12951295
LintId::of(&blacklisted_name::BLACKLISTED_NAME),
@@ -1736,6 +1736,8 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
17361736
LintId::of(&attrs::DEPRECATED_SEMVER),
17371737
LintId::of(&attrs::MISMATCHED_TARGET_OS),
17381738
LintId::of(&attrs::USELESS_ATTRIBUTE),
1739+
LintId::of(&await_holding_invalid::AWAIT_HOLDING_LOCK),
1740+
LintId::of(&await_holding_invalid::AWAIT_HOLDING_REFCELL_REF),
17391741
LintId::of(&bit_mask::BAD_BIT_MASK),
17401742
LintId::of(&bit_mask::INEFFECTIVE_BIT_MASK),
17411743
LintId::of(&booleans::LOGIC_BUG),

src/lintlist/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,14 @@ vec![
6262
},
6363
Lint {
6464
name: "await_holding_lock",
65-
group: "pedantic",
65+
group: "correctness",
6666
desc: "Inside an async function, holding a MutexGuard while calling await",
6767
deprecation: None,
6868
module: "await_holding_invalid",
6969
},
7070
Lint {
7171
name: "await_holding_refcell_ref",
72-
group: "pedantic",
72+
group: "correctness",
7373
desc: "Inside an async function, holding a RefCell ref while calling await",
7474
deprecation: None,
7575
module: "await_holding_invalid",

0 commit comments

Comments
 (0)