Skip to content

Commit b6c4b30

Browse files
committed
move copies.rs to ifs/mod.rs
all the lints work with `if`-expressions
1 parent 1c14af8 commit b6c4b30

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

clippy_lints/src/declared_lints.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,6 @@ pub static LINTS: &[&::declare_clippy_lint::LintInfo] = &[
8484
crate::collapsible_if::COLLAPSIBLE_IF_INFO,
8585
crate::collection_is_never_read::COLLECTION_IS_NEVER_READ_INFO,
8686
crate::comparison_chain::COMPARISON_CHAIN_INFO,
87-
crate::copies::BRANCHES_SHARING_CODE_INFO,
88-
crate::copies::IFS_SAME_COND_INFO,
89-
crate::copies::IF_SAME_THEN_ELSE_INFO,
90-
crate::copies::SAME_FUNCTIONS_IN_IF_CONDITION_INFO,
9187
crate::copy_iterator::COPY_ITERATOR_INFO,
9288
crate::crate_in_macro_def::CRATE_IN_MACRO_DEF_INFO,
9389
crate::create_dir::CREATE_DIR_INFO,
@@ -204,6 +200,10 @@ pub static LINTS: &[&::declare_clippy_lint::LintInfo] = &[
204200
crate::if_let_mutex::IF_LET_MUTEX_INFO,
205201
crate::if_not_else::IF_NOT_ELSE_INFO,
206202
crate::if_then_some_else_none::IF_THEN_SOME_ELSE_NONE_INFO,
203+
crate::ifs::BRANCHES_SHARING_CODE_INFO,
204+
crate::ifs::IFS_SAME_COND_INFO,
205+
crate::ifs::IF_SAME_THEN_ELSE_INFO,
206+
crate::ifs::SAME_FUNCTIONS_IN_IF_CONDITION_INFO,
207207
crate::ignored_unit_patterns::IGNORED_UNIT_PATTERNS_INFO,
208208
crate::impl_hash_with_borrow_str_and_bytes::IMPL_HASH_BORROW_WITH_STR_AND_BYTES_INFO,
209209
crate::implicit_hasher::IMPLICIT_HASHER_INFO,
File renamed without changes.

clippy_lints/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ mod cognitive_complexity;
100100
mod collapsible_if;
101101
mod collection_is_never_read;
102102
mod comparison_chain;
103-
mod copies;
104103
mod copy_iterator;
105104
mod crate_in_macro_def;
106105
mod create_dir;
@@ -158,6 +157,7 @@ mod future_not_send;
158157
mod if_let_mutex;
159158
mod if_not_else;
160159
mod if_then_some_else_none;
160+
mod ifs;
161161
mod ignored_unit_patterns;
162162
mod impl_hash_with_borrow_str_and_bytes;
163163
mod implicit_hasher;
@@ -549,7 +549,7 @@ pub fn register_lint_passes(store: &mut rustc_lint::LintStore, conf: &'static Co
549549
store.register_late_pass(|_| Box::new(empty_enum::EmptyEnum));
550550
store.register_late_pass(|_| Box::new(invalid_upcast_comparisons::InvalidUpcastComparisons));
551551
store.register_late_pass(|_| Box::<regex::Regex>::default());
552-
store.register_late_pass(move |tcx| Box::new(copies::CopyAndPaste::new(tcx, conf)));
552+
store.register_late_pass(move |tcx| Box::new(ifs::CopyAndPaste::new(tcx, conf)));
553553
store.register_late_pass(|_| Box::new(copy_iterator::CopyIterator));
554554
let format_args = format_args_storage.clone();
555555
store.register_late_pass(move |_| Box::new(format::UselessFormat::new(format_args.clone())));

0 commit comments

Comments
 (0)