about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDavid Tolnay <dtolnay@gmail.com>2021-02-25 20:31:24 -0800
committerDavid Tolnay <dtolnay@gmail.com>2021-02-25 20:31:24 -0800
commit8f47a4214e66b67bbcbcc0a1c1fd3f3d481ed85e (patch)
tree5520e37b105887bd17c7c67113d6237daac41644
parentd5223be2e30a9d116b839bda418bec99d2949a68 (diff)
downloadrust-8f47a4214e66b67bbcbcc0a1c1fd3f3d481ed85e.tar.gz
rust-8f47a4214e66b67bbcbcc0a1c1fd3f3d481ed85e.zip
Downgrade manual_map to nursery
-rw-r--r--clippy_lints/src/lib.rs3
-rw-r--r--clippy_lints/src/manual_map.rs4
2 files changed, 3 insertions, 4 deletions
diff --git a/clippy_lints/src/lib.rs b/clippy_lints/src/lib.rs
index 176eeadcc63..faec9ec31f3 100644
--- a/clippy_lints/src/lib.rs
+++ b/clippy_lints/src/lib.rs
@@ -1540,7 +1540,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
         LintId::of(&loops::WHILE_LET_ON_ITERATOR),
         LintId::of(&main_recursion::MAIN_RECURSION),
         LintId::of(&manual_async_fn::MANUAL_ASYNC_FN),
-        LintId::of(&manual_map::MANUAL_MAP),
         LintId::of(&manual_non_exhaustive::MANUAL_NON_EXHAUSTIVE),
         LintId::of(&manual_strip::MANUAL_STRIP),
         LintId::of(&manual_unwrap_or::MANUAL_UNWRAP_OR),
@@ -1771,7 +1770,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
         LintId::of(&loops::WHILE_LET_ON_ITERATOR),
         LintId::of(&main_recursion::MAIN_RECURSION),
         LintId::of(&manual_async_fn::MANUAL_ASYNC_FN),
-        LintId::of(&manual_map::MANUAL_MAP),
         LintId::of(&manual_non_exhaustive::MANUAL_NON_EXHAUSTIVE),
         LintId::of(&map_clone::MAP_CLONE),
         LintId::of(&matches::INFALLIBLE_DESTRUCTURING_MATCH),
@@ -2047,6 +2045,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
         LintId::of(&floating_point_arithmetic::SUBOPTIMAL_FLOPS),
         LintId::of(&future_not_send::FUTURE_NOT_SEND),
         LintId::of(&let_if_seq::USELESS_LET_IF_SEQ),
+        LintId::of(&manual_map::MANUAL_MAP),
         LintId::of(&missing_const_for_fn::MISSING_CONST_FOR_FN),
         LintId::of(&mutable_debug_assertion::DEBUG_ASSERT_WITH_MUT_CALL),
         LintId::of(&mutex_atomic::MUTEX_INTEGER),
diff --git a/clippy_lints/src/manual_map.rs b/clippy_lints/src/manual_map.rs
index a50a3943bab..78dc0d54f28 100644
--- a/clippy_lints/src/manual_map.rs
+++ b/clippy_lints/src/manual_map.rs
@@ -19,7 +19,7 @@ declare_clippy_lint! {
     ///
     /// **Why is this bad?** Using the `map` method is clearer and more concise.
     ///
-    /// **Known problems:** None.
+    /// **Known problems:** `map` is not capable of representing some control flow which works fine in `match`.
     ///
     /// **Example:**
     ///
@@ -34,7 +34,7 @@ declare_clippy_lint! {
     /// Some(0).map(|x| x + 1);
     /// ```
     pub MANUAL_MAP,
-    style,
+    nursery,
     "reimplementation of `map`"
 }