Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit f9567f1

Browse files
committedMay 17, 2022
Drop needless match to clippy's nursery
This lint has a false positive and there's not an easy backport available, particularly given how late in the cycle we are at this point.
1 parent 2775176 commit f9567f1

File tree

4 files changed

+2
-3
lines changed

4 files changed

+2
-3
lines changed
 

‎src/tools/clippy/clippy_lints/src/lib.register_all.rs

-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@ store.register_group(true, "clippy::all", Some("clippy_all"), vec![
139139
LintId::of(matches::MATCH_OVERLAPPING_ARM),
140140
LintId::of(matches::MATCH_REF_PATS),
141141
LintId::of(matches::MATCH_SINGLE_BINDING),
142-
LintId::of(matches::NEEDLESS_MATCH),
143142
LintId::of(matches::REDUNDANT_PATTERN_MATCHING),
144143
LintId::of(matches::SINGLE_MATCH),
145144
LintId::of(matches::WILDCARD_IN_OR_PATTERNS),

‎src/tools/clippy/clippy_lints/src/lib.register_complexity.rs

-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ store.register_group(true, "clippy::complexity", Some("clippy_complexity"), vec!
3030
LintId::of(map_unit_fn::RESULT_MAP_UNIT_FN),
3131
LintId::of(matches::MATCH_AS_REF),
3232
LintId::of(matches::MATCH_SINGLE_BINDING),
33-
LintId::of(matches::NEEDLESS_MATCH),
3433
LintId::of(matches::WILDCARD_IN_OR_PATTERNS),
3534
LintId::of(methods::BIND_INSTEAD_OF_MAP),
3635
LintId::of(methods::CLONE_ON_COPY),

‎src/tools/clippy/clippy_lints/src/lib.register_nursery.rs

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ store.register_group(true, "clippy::nursery", Some("clippy_nursery"), vec![
1313
LintId::of(future_not_send::FUTURE_NOT_SEND),
1414
LintId::of(index_refutable_slice::INDEX_REFUTABLE_SLICE),
1515
LintId::of(let_if_seq::USELESS_LET_IF_SEQ),
16+
LintId::of(matches::NEEDLESS_MATCH),
1617
LintId::of(methods::ITER_WITH_DRAIN),
1718
LintId::of(missing_const_for_fn::MISSING_CONST_FOR_FN),
1819
LintId::of(mutable_debug_assertion::DEBUG_ASSERT_WITH_MUT_CALL),

‎src/tools/clippy/clippy_lints/src/matches/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ declare_clippy_lint! {
606606
/// ```
607607
#[clippy::version = "1.61.0"]
608608
pub NEEDLESS_MATCH,
609-
complexity,
609+
nursery,
610610
"`match` or match-like `if let` that are unnecessary"
611611
}
612612

0 commit comments

Comments
 (0)
Please sign in to comment.