diff options
| author | bors <bors@rust-lang.org> | 2021-03-03 21:26:24 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-03-03 21:26:24 +0000 |
| commit | ff51964102db6fbf73cd2e111d441bf8202ea205 (patch) | |
| tree | 3f34cbb5626b8c0f63f9dbd36266dbe1f834f8aa | |
| parent | 43d19f63f7c6007284387e76cfe0fe8b74e98a59 (diff) | |
| parent | 9e4a064f0878215fccaa3bebdfaf4459db984da3 (diff) | |
| download | rust-ff51964102db6fbf73cd2e111d441bf8202ea205.tar.gz rust-ff51964102db6fbf73cd2e111d441bf8202ea205.zip | |
Auto merge of #6825 - djc:naive-bytecount-pedantic, r=Manishearth
Move naive_bytecount to pedantic As discussed on Zulip, current best practice is to avoid recommending external crates. This lint is from before that was enforced. Move it to the pedantic group to avoid enabling it by default. https://rust-lang.zulipchat.com/#narrow/stream/257328-clippy/topic/naive_bytecount.20suggesting.20extra.20dependency changelog: move [`naive_bytecount`] to pedantic
| -rw-r--r-- | clippy_lints/src/bytecount.rs | 2 | ||||
| -rw-r--r-- | clippy_lints/src/lib.rs | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/clippy_lints/src/bytecount.rs b/clippy_lints/src/bytecount.rs index b8828719f62..eb5dc7ceecd 100644 --- a/clippy_lints/src/bytecount.rs +++ b/clippy_lints/src/bytecount.rs @@ -28,7 +28,7 @@ declare_clippy_lint! { /// &vec.iter().filter(|x| **x == 0u8).count(); // use bytecount::count instead /// ``` pub NAIVE_BYTECOUNT, - perf, + pedantic, "use of naive `<slice>.filter(|&x| x == y).count()` to count byte values" } diff --git a/clippy_lints/src/lib.rs b/clippy_lints/src/lib.rs index 183778cb55e..8259fd3c320 100644 --- a/clippy_lints/src/lib.rs +++ b/clippy_lints/src/lib.rs @@ -1343,6 +1343,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf: 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(&bytecount::NAIVE_BYTECOUNT), LintId::of(&case_sensitive_file_extension_comparisons::CASE_SENSITIVE_FILE_EXTENSION_COMPARISONS), LintId::of(&checked_conversions::CHECKED_CONVERSIONS), LintId::of(&copies::SAME_FUNCTIONS_IN_IF_CONDITION), @@ -1458,7 +1459,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf: LintId::of(&blocks_in_if_conditions::BLOCKS_IN_IF_CONDITIONS), LintId::of(&booleans::LOGIC_BUG), LintId::of(&booleans::NONMINIMAL_BOOL), - LintId::of(&bytecount::NAIVE_BYTECOUNT), LintId::of(&collapsible_if::COLLAPSIBLE_ELSE_IF), LintId::of(&collapsible_if::COLLAPSIBLE_IF), LintId::of(&collapsible_match::COLLAPSIBLE_MATCH), @@ -2015,7 +2015,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf: ]); store.register_group(true, "clippy::perf", Some("clippy_perf"), vec