Skip to content

Commit 51282fc

Browse files
committed
Auto merge of #8261 - taiki-e:disallowed, r=giraffate
Warn disallowed_methods and disallowed_types by default Closes #7841 changelog: Moved [`disallowed_methods`] and [`disallowed_types`] to `style`
2 parents b66dbe8 + 5f143c6 commit 51282fc

File tree

5 files changed

+12
-4
lines changed

5 files changed

+12
-4
lines changed

clippy_lints/src/disallowed_methods.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ declare_clippy_lint! {
1111
/// ### What it does
1212
/// Denies the configured methods and functions in clippy.toml
1313
///
14+
/// Note: Even though this lint is warn-by-default, it will only trigger if
15+
/// methods are defined in the clippy.toml file.
16+
///
1417
/// ### Why is this bad?
1518
/// Some methods are undesirable in certain contexts, and it's beneficial to
1619
/// lint for them as needed.
@@ -49,7 +52,7 @@ declare_clippy_lint! {
4952
/// ```
5053
#[clippy::version = "1.49.0"]
5154
pub DISALLOWED_METHODS,
52-
nursery,
55+
style,
5356
"use of a disallowed method call"
5457
}
5558

clippy_lints/src/disallowed_types.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ declare_clippy_lint! {
1414
/// ### What it does
1515
/// Denies the configured types in clippy.toml.
1616
///
17+
/// Note: Even though this lint is warn-by-default, it will only trigger if
18+
/// types are defined in the clippy.toml file.
19+
///
1720
/// ### Why is this bad?
1821
/// Some types are undesirable in certain contexts.
1922
///
@@ -44,7 +47,7 @@ declare_clippy_lint! {
4447
/// ```
4548
#[clippy::version = "1.55.0"]
4649
pub DISALLOWED_TYPES,
47-
nursery,
50+
style,
4851
"use of disallowed types"
4952
}
5053
#[derive(Clone, Debug)]

clippy_lints/src/lib.register_all.rs

+2
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ store.register_group(true, "clippy::all", Some("clippy_all"), vec![
3737
LintId::of(derivable_impls::DERIVABLE_IMPLS),
3838
LintId::of(derive::DERIVE_HASH_XOR_EQ),
3939
LintId::of(derive::DERIVE_ORD_XOR_PARTIAL_ORD),
40+
LintId::of(disallowed_methods::DISALLOWED_METHODS),
41+
LintId::of(disallowed_types::DISALLOWED_TYPES),
4042
LintId::of(doc::MISSING_SAFETY_DOC),
4143
LintId::of(doc::NEEDLESS_DOCTEST_MAIN),
4244
LintId::of(double_comparison::DOUBLE_COMPARISONS),

clippy_lints/src/lib.register_nursery.rs

-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ store.register_group(true, "clippy::nursery", Some("clippy_nursery"), vec![
66
LintId::of(attrs::EMPTY_LINE_AFTER_OUTER_ATTR),
77
LintId::of(cognitive_complexity::COGNITIVE_COMPLEXITY),
88
LintId::of(copies::BRANCHES_SHARING_CODE),
9-
LintId::of(disallowed_methods::DISALLOWED_METHODS),
10-
LintId::of(disallowed_types::DISALLOWED_TYPES),
119
LintId::of(equatable_if_let::EQUATABLE_IF_LET),
1210
LintId::of(fallible_impl_from::FALLIBLE_IMPL_FROM),
1311
LintId::of(floating_point_arithmetic::IMPRECISE_FLOPS),

clippy_lints/src/lib.register_style.rs

+2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ store.register_group(true, "clippy::style", Some("clippy_style"), vec![
1616
LintId::of(comparison_chain::COMPARISON_CHAIN),
1717
LintId::of(default::FIELD_REASSIGN_WITH_DEFAULT),
1818
LintId::of(dereference::NEEDLESS_BORROW),
19+
LintId::of(disallowed_methods::DISALLOWED_METHODS),
20+
LintId::of(disallowed_types::DISALLOWED_TYPES),
1921
LintId::of(doc::MISSING_SAFETY_DOC),
2022
LintId::of(doc::NEEDLESS_DOCTEST_MAIN),
2123
LintId::of(enum_variants::ENUM_VARIANT_NAMES),

0 commit comments

Comments
 (0)