Skip to content

Commit 186bf1c

Browse files
committed
Auto merge of rust-lang#6796 - dtolnay-contrib:manualmap, r=flip1995
Downgrade manual_map to nursery I believe rust-lang#6795 should be considered a blocker for this lint to be considered for enabling by default. --- changelog: remove manual_map from default list of enabled lints
2 parents d5223be + 8f47a42 commit 186bf1c

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

clippy_lints/src/lib.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1540,7 +1540,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
15401540
LintId::of(&loops::WHILE_LET_ON_ITERATOR),
15411541
LintId::of(&main_recursion::MAIN_RECURSION),
15421542
LintId::of(&manual_async_fn::MANUAL_ASYNC_FN),
1543-
LintId::of(&manual_map::MANUAL_MAP),
15441543
LintId::of(&manual_non_exhaustive::MANUAL_NON_EXHAUSTIVE),
15451544
LintId::of(&manual_strip::MANUAL_STRIP),
15461545
LintId::of(&manual_unwrap_or::MANUAL_UNWRAP_OR),
@@ -1771,7 +1770,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
17711770
LintId::of(&loops::WHILE_LET_ON_ITERATOR),
17721771
LintId::of(&main_recursion::MAIN_RECURSION),
17731772
LintId::of(&manual_async_fn::MANUAL_ASYNC_FN),
1774-
LintId::of(&manual_map::MANUAL_MAP),
17751773
LintId::of(&manual_non_exhaustive::MANUAL_NON_EXHAUSTIVE),
17761774
LintId::of(&map_clone::MAP_CLONE),
17771775
LintId::of(&matches::INFALLIBLE_DESTRUCTURING_MATCH),
@@ -2047,6 +2045,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
20472045
LintId::of(&floating_point_arithmetic::SUBOPTIMAL_FLOPS),
20482046
LintId::of(&future_not_send::FUTURE_NOT_SEND),
20492047
LintId::of(&let_if_seq::USELESS_LET_IF_SEQ),
2048+
LintId::of(&manual_map::MANUAL_MAP),
20502049
LintId::of(&missing_const_for_fn::MISSING_CONST_FOR_FN),
20512050
LintId::of(&mutable_debug_assertion::DEBUG_ASSERT_WITH_MUT_CALL),
20522051
LintId::of(&mutex_atomic::MUTEX_INTEGER),

clippy_lints/src/manual_map.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ declare_clippy_lint! {
1919
///
2020
/// **Why is this bad?** Using the `map` method is clearer and more concise.
2121
///
22-
/// **Known problems:** None.
22+
/// **Known problems:** `map` is not capable of representing some control flow which works fine in `match`.
2323
///
2424
/// **Example:**
2525
///
@@ -34,7 +34,7 @@ declare_clippy_lint! {
3434
/// Some(0).map(|x| x + 1);
3535
/// ```
3636
pub MANUAL_MAP,
37-
style,
37+
nursery,
3838
"reimplementation of `map`"
3939
}
4040

0 commit comments

Comments
 (0)