Skip to content

Commit 15b1c6f

Browse files
committed
Auto merge of #7595 - camsteffen:branches-sharing-nursery, r=Manishearth
Move branches_sharing_code to nursery changelog: Move [`branches_sharing_code`] to nursery ...since there are quite a few [open bugs](https://github.com/rust-lang/rust-clippy/issues?q=is%3Aissue+is%3Aopen+branches_sharing_code).
2 parents 6ca0007 + 2f73776 commit 15b1c6f

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

clippy_lints/src/copies.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ declare_clippy_lint! {
148148
/// };
149149
/// ```
150150
pub BRANCHES_SHARING_CODE,
151-
complexity,
151+
nursery,
152152
"`if` statement with shared code in all blocks"
153153
}
154154

clippy_lints/src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1200,7 +1200,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
12001200
LintId::of(collapsible_if::COLLAPSIBLE_IF),
12011201
LintId::of(collapsible_match::COLLAPSIBLE_MATCH),
12021202
LintId::of(comparison_chain::COMPARISON_CHAIN),
1203-
LintId::of(copies::BRANCHES_SHARING_CODE),
12041203
LintId::of(copies::IFS_SAME_COND),
12051204
LintId::of(copies::IF_SAME_THEN_ELSE),
12061205
LintId::of(default::FIELD_REASSIGN_WITH_DEFAULT),
@@ -1589,7 +1588,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
15891588
LintId::of(booleans::NONMINIMAL_BOOL),
15901589
LintId::of(casts::CHAR_LIT_AS_U8),
15911590
LintId::of(casts::UNNECESSARY_CAST),
1592-
LintId::of(copies::BRANCHES_SHARING_CODE),
15931591
LintId::of(double_comparison::DOUBLE_COMPARISONS),
15941592
LintId::of(double_parens::DOUBLE_PARENS),
15951593
LintId::of(duration_subsec::DURATION_SUBSEC),
@@ -1798,6 +1796,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
17981796
store.register_group(true, "clippy::nursery", Some("clippy_nursery"), vec![
17991797
LintId::of(attrs::EMPTY_LINE_AFTER_OUTER_ATTR),
18001798
LintId::of(cognitive_complexity::COGNITIVE_COMPLEXITY),
1799+
LintId::of(copies::BRANCHES_SHARING_CODE),
18011800
LintId::of(disallowed_method::DISALLOWED_METHOD),
18021801
LintId::of(disallowed_type::DISALLOWED_TYPE),
18031802
LintId::of(fallible_impl_from::FALLIBLE_IMPL_FROM),

0 commit comments

Comments
 (0)