Convert the await holding lints to correctness

This commit is contained in:
Daniel Smith 2020-10-13 13:20:01 -04:00
parent ee20ebadaf
commit d8c6bce440
3 changed files with 8 additions and 6 deletions

View File

@ -45,7 +45,7 @@ declare_clippy_lint! {
/// }
/// ```
pub AWAIT_HOLDING_LOCK,
pedantic,
correctness,
"Inside an async function, holding a MutexGuard while calling await"
}
@ -126,7 +126,7 @@ declare_clippy_lint! {
/// }
/// ```
pub AWAIT_HOLDING_REFCELL_REF,
pedantic,
correctness,
"Inside an async function, holding a RefCell ref while calling await"
}

View File

@ -1190,8 +1190,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
store.register_group(true, "clippy::pedantic", Some("clippy_pedantic"), vec![
LintId::of(&attrs::INLINE_ALWAYS),
LintId::of(&await_holding_invalid::AWAIT_HOLDING_LOCK),
LintId::of(&await_holding_invalid::AWAIT_HOLDING_REFCELL_REF),
LintId::of(&bit_mask::VERBOSE_BIT_MASK),
LintId::of(&checked_conversions::CHECKED_CONVERSIONS),
LintId::of(&copies::MATCH_SAME_ARMS),
@ -1290,6 +1288,8 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
LintId::of(&attrs::MISMATCHED_TARGET_OS),
LintId::of(&attrs::UNKNOWN_CLIPPY_LINTS),
LintId::of(&attrs::USELESS_ATTRIBUTE),
LintId::of(&await_holding_invalid::AWAIT_HOLDING_LOCK),
LintId::of(&await_holding_invalid::AWAIT_HOLDING_REFCELL_REF),
LintId::of(&bit_mask::BAD_BIT_MASK),
LintId::of(&bit_mask::INEFFECTIVE_BIT_MASK),
LintId::of(&blacklisted_name::BLACKLISTED_NAME),
@ -1736,6 +1736,8 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
LintId::of(&attrs::DEPRECATED_SEMVER),
LintId::of(&attrs::MISMATCHED_TARGET_OS),
LintId::of(&attrs::USELESS_ATTRIBUTE),
LintId::of(&await_holding_invalid::AWAIT_HOLDING_LOCK),
LintId::of(&await_holding_invalid::AWAIT_HOLDING_REFCELL_REF),
LintId::of(&bit_mask::BAD_BIT_MASK),
LintId::of(&bit_mask::INEFFECTIVE_BIT_MASK),
LintId::of(&booleans::LOGIC_BUG),

View File

@ -62,14 +62,14 @@ vec![
},
Lint {
name: "await_holding_lock",
group: "pedantic",
group: "correctness",
desc: "Inside an async function, holding a MutexGuard while calling await",
deprecation: None,
module: "await_holding_invalid",
},
Lint {
name: "await_holding_refcell_ref",
group: "pedantic",
group: "correctness",
desc: "Inside an async function, holding a RefCell ref while calling await",
deprecation: None,
module: "await_holding_invalid",