]> git.lizzy.rs Git - rust.git/commitdiff
Document map_clone known problems #498
authorVlad-Shcherbina <vlad.shcherbina@gmail.com>
Wed, 17 Jan 2018 18:40:47 +0000 (21:40 +0300)
committerGitHub <noreply@github.com>
Wed, 17 Jan 2018 18:40:47 +0000 (21:40 +0300)
clippy_lints/src/map_clone.rs

index e126d5c07d700ae6887ef457402165399affa301..8403974629d611568a6cd9596182c0e2344f737e 100644 (file)
@@ -10,7 +10,9 @@
 /// **Why is this bad?** It makes the code less readable than using the
 /// `.cloned()` adapter.
 ///
-/// **Known problems:** None.
+/// **Known problems:** Sometimes `.cloned()` requires stricter trait
+/// bound than `.map(|e| e.clone())` (which works because of the coercion).
+/// See [#498](https://github.com/rust-lang-nursery/rust-clippy/issues/498).
 ///
 /// **Example:**
 /// ```rust