Skip to content

Commit 0402c6a

Browse files
committed
Auto merge of #6354 - Daniel-B-Smith:refcell_ref_await, r=flip1995
Downgrade the await holding lints from correctness We found a false positive in these lints (see #6353 for more details). As a short-term mitigation, this downgrades the lints from correctness to limit the noise. changelog: downgrade AWAIT_HOLDING_REFCELL_REF and AWAIT_HOLDING_LOCK to pedantic. From rustup earlier, where I forgot the changlog: deprecate [`panic_params`] (uplifted)
2 parents 70ffebf + 8b21241 commit 0402c6a

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
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-
correctness,
48+
pedantic,
4949
"Inside an async function, holding a MutexGuard while calling await"
5050
}
5151

@@ -84,7 +84,7 @@ declare_clippy_lint! {
8484
/// }
8585
/// ```
8686
pub AWAIT_HOLDING_REFCELL_REF,
87-
correctness,
87+
pedantic,
8888
"Inside an async function, holding a RefCell ref while calling await"
8989
}
9090

clippy_lints/src/lib.rs

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

12251225
store.register_group(true, "clippy::pedantic", Some("clippy_pedantic"), vec![
12261226
LintId::of(&attrs::INLINE_ALWAYS),
1227+
LintId::of(&await_holding_invalid::AWAIT_HOLDING_LOCK),
1228+
LintId::of(&await_holding_invalid::AWAIT_HOLDING_REFCELL_REF),
12271229
LintId::of(&bit_mask::VERBOSE_BIT_MASK),
12281230
LintId::of(&checked_conversions::CHECKED_CONVERSIONS),
12291231
LintId::of(&copies::SAME_FUNCTIONS_IN_IF_CONDITION),
@@ -1327,8 +1329,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
13271329
LintId::of(&attrs::MISMATCHED_TARGET_OS),
13281330
LintId::of(&attrs::UNKNOWN_CLIPPY_LINTS),
13291331
LintId::of(&attrs::USELESS_ATTRIBUTE),
1330-
LintId::of(&await_holding_invalid::AWAIT_HOLDING_LOCK),
1331-
LintId::of(&await_holding_invalid::AWAIT_HOLDING_REFCELL_REF),
13321332
LintId::of(&bit_mask::BAD_BIT_MASK),
13331333
LintId::of(&bit_mask::INEFFECTIVE_BIT_MASK),
13341334
LintId::of(&blacklisted_name::BLACKLISTED_NAME),
@@ -1793,8 +1793,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
17931793
LintId::of(&attrs::DEPRECATED_SEMVER),
17941794
LintId::of(&attrs::MISMATCHED_TARGET_OS),
17951795
LintId::of(&attrs::USELESS_ATTRIBUTE),
1796-
LintId::of(&await_holding_invalid::AWAIT_HOLDING_LOCK),
1797-
LintId::of(&await_holding_invalid::AWAIT_HOLDING_REFCELL_REF),
17981796
LintId::of(&bit_mask::BAD_BIT_MASK),
17991797
LintId::of(&bit_mask::INEFFECTIVE_BIT_MASK),
18001798
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: "correctness",
65+
group: "pedantic",
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: "correctness",
72+
group: "pedantic",
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)