]> git.lizzy.rs Git - rust.git/commitdiff
Convert the await holding lints to correctness
authorDaniel Smith <daniel.smith@datadoghq.com>
Tue, 13 Oct 2020 17:20:01 +0000 (13:20 -0400)
committerDaniel Smith <daniel.smith@datadoghq.com>
Wed, 21 Oct 2020 15:04:26 +0000 (11:04 -0400)
clippy_lints/src/await_holding_invalid.rs
clippy_lints/src/lib.rs
src/lintlist/mod.rs

index 2000bdae363fde90d591daeba2c530c23677f36b..1d201ff095b909deee3f75cd309ed902641c18b4 100644 (file)
@@ -45,7 +45,7 @@
     /// }
     /// ```
     pub AWAIT_HOLDING_LOCK,
-    pedantic,
+    correctness,
     "Inside an async function, holding a MutexGuard while calling await"
 }
 
@@ -126,7 +126,7 @@ fn is_mutex_guard(cx: &LateContext<'_>, def_id: DefId) -> bool {
     /// }
     /// ```
     pub AWAIT_HOLDING_REFCELL_REF,
-    pedantic,
+    correctness,
     "Inside an async function, holding a RefCell ref while calling await"
 }
 
index 0c5baf96970c599cd842cdf59767f05fa85200cf..c627df209763c4d6da5286bdba6b54c7994ab775 100644 (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),
index c955f37b83a39328db5b2566db6d706d6f2f364c..d9e019e2b611e9bbe266576750cc2fc05a0a7b17 100644 (file)
     },
     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",