Skip to content

Commit 18262d0

Browse files
committed
Not all lints are defined properly
1 parent ebb5ecf commit 18262d0

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1413,7 +1413,6 @@ Released 2018-09-13
14131413
[`await_holding_lock`]: https://rust-lang.github.io/rust-clippy/master/index.html#await_holding_lock
14141414
[`bad_bit_mask`]: https://rust-lang.github.io/rust-clippy/master/index.html#bad_bit_mask
14151415
[`bind_instead_of_map`]: https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map
1416-
[`disallowed_name`]: https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_name
14171416
[`blanket_clippy_restriction_lints`]: https://rust-lang.github.io/rust-clippy/master/index.html#blanket_clippy_restriction_lints
14181417
[`blocks_in_if_conditions`]: https://rust-lang.github.io/rust-clippy/master/index.html#blocks_in_if_conditions
14191418
[`bool_comparison`]: https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison
@@ -1455,6 +1454,7 @@ Released 2018-09-13
14551454
[`deref_addrof`]: https://rust-lang.github.io/rust-clippy/master/index.html#deref_addrof
14561455
[`derive_hash_xor_eq`]: https://rust-lang.github.io/rust-clippy/master/index.html#derive_hash_xor_eq
14571456
[`derive_ord_xor_partial_ord`]: https://rust-lang.github.io/rust-clippy/master/index.html#derive_ord_xor_partial_ord
1457+
[`disallowed_name`]: https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_name
14581458
[`diverging_sub_expression`]: https://rust-lang.github.io/rust-clippy/master/index.html#diverging_sub_expression
14591459
[`doc_markdown`]: https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
14601460
[`double_comparisons`]: https://rust-lang.github.io/rust-clippy/master/index.html#double_comparisons

clippy_lints/src/lib.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@ mod atomic_ordering;
158158
mod attrs;
159159
mod await_holding_lock;
160160
mod bit_mask;
161-
mod disallowed_name;
162161
mod blocks_in_if_conditions;
163162
mod booleans;
164163
mod bytecount;
@@ -173,6 +172,7 @@ mod dbg_macro;
173172
mod default_trait_access;
174173
mod dereference;
175174
mod derive;
175+
mod disallowed_name;
176176
mod doc;
177177
mod double_comparison;
178178
mod double_parens;
@@ -492,7 +492,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
492492
&bit_mask::BAD_BIT_MASK,
493493
&bit_mask::INEFFECTIVE_BIT_MASK,
494494
&bit_mask::VERBOSE_BIT_MASK,
495-
&disallowed_name::DISALLOWED_NAME,
496495
&blocks_in_if_conditions::BLOCKS_IN_IF_CONDITIONS,
497496
&booleans::LOGIC_BUG,
498497
&booleans::NONMINIMAL_BOOL,
@@ -514,6 +513,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
514513
&derive::DERIVE_ORD_XOR_PARTIAL_ORD,
515514
&derive::EXPL_IMPL_CLONE_ON_COPY,
516515
&derive::UNSAFE_DERIVE_DESERIALIZE,
516+
&disallowed_name::DISALLOWED_NAME,
517517
&doc::DOC_MARKDOWN,
518518
&doc::MISSING_ERRORS_DOC,
519519
&doc::MISSING_SAFETY_DOC,
@@ -1227,7 +1227,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
12271227
LintId::of(&bit_mask::BAD_BIT_MASK),
12281228
LintId::of(&bit_mask::INEFFECTIVE_BIT_MASK),
12291229
LintId::of(&bit_mask::VERBOSE_BIT_MASK),
1230-
LintId::of(&disallowed_name::DISALLOWED_NAME),
12311230
LintId::of(&blocks_in_if_conditions::BLOCKS_IN_IF_CONDITIONS),
12321231
LintId::of(&booleans::LOGIC_BUG),
12331232
LintId::of(&booleans::NONMINIMAL_BOOL),
@@ -1238,6 +1237,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
12381237
LintId::of(&copies::IF_SAME_THEN_ELSE),
12391238
LintId::of(&derive::DERIVE_HASH_XOR_EQ),
12401239
LintId::of(&derive::DERIVE_ORD_XOR_PARTIAL_ORD),
1240+
LintId::of(&disallowed_name::DISALLOWED_NAME),
12411241
LintId::of(&doc::MISSING_SAFETY_DOC),
12421242
LintId::of(&doc::NEEDLESS_DOCTEST_MAIN),
12431243
LintId::of(&double_comparison::DOUBLE_COMPARISONS),
@@ -1480,10 +1480,10 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
14801480
LintId::of(&attrs::BLANKET_CLIPPY_RESTRICTION_LINTS),
14811481
LintId::of(&attrs::UNKNOWN_CLIPPY_LINTS),
14821482
LintId::of(&bit_mask::VERBOSE_BIT_MASK),
1483-
LintId::of(&disallowed_name::DISALLOWED_NAME),
14841483
LintId::of(&blocks_in_if_conditions::BLOCKS_IN_IF_CONDITIONS),
14851484
LintId::of(&collapsible_if::COLLAPSIBLE_IF),
14861485
LintId::of(&comparison_chain::COMPARISON_CHAIN),
1486+
LintId::of(&disallowed_name::DISALLOWED_NAME),
14871487
LintId::of(&doc::MISSING_SAFETY_DOC),
14881488
LintId::of(&doc::NEEDLESS_DOCTEST_MAIN),
14891489
LintId::of(&enum_variants::ENUM_VARIANT_NAMES),

clippy_lints/src/utils/conf.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ pub fn read(path: &Path) -> (Conf, Vec<Error>) {
236236
errors.push(Error::Toml(cyc_err));
237237
}
238238

239-
let block_ls_field = toml_ref.blacklisted_names;
239+
let block_ls_field = &toml_ref.blacklisted_names;
240240
if !block_ls_field.is_empty() {
241241
let block_err = "found deprecated field `blacklisted-names`. Please use `disallowed-names` instead.".to_string();
242242
errors.push(Error::Toml(block_err));

src/lintlist/mod.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,6 @@ pub static ref ALL_LINTS: Vec<Lint> = vec![
7373
deprecation: None,
7474
module: "methods",
7575
},
76-
Lint {
77-
name: "disallowed_name",
78-
group: "style",
79-
desc: "usage of a disallowed/placeholder name",
80-
deprecation: None,
81-
module: "disallowed_name",
82-
},
8376
Lint {
8477
name: "blanket_clippy_restriction_lints",
8578
group: "style",
@@ -367,6 +360,13 @@ pub static ref ALL_LINTS: Vec<Lint> = vec![
367360
deprecation: None,
368361
module: "derive",
369362
},
363+
Lint {
364+
name: "disallowed_name",
365+
group: "style",
366+
desc: "usage of a disallowed/placeholder name",
367+
deprecation: None,
368+
module: "disallowed_name",
369+
},
370370
Lint {
371371
name: "diverging_sub_expression",
372372
group: "complexity",

0 commit comments

Comments
 (0)