From d2c069de1e85cf6d236d040a5be4021092bfdb57 Mon Sep 17 00:00:00 2001 From: Vlad-Shcherbina Date: Wed, 17 Jan 2018 21:40:47 +0300 Subject: [PATCH] Document map_clone known problems #498 (cherry picked from commit ada0d2c54831a904a53ff4106e0ebb6a0f06a687) --- clippy_lints/src/map_clone.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/clippy_lints/src/map_clone.rs b/clippy_lints/src/map_clone.rs index 8ca1fbb2759..d45fcc7e860 100644 --- a/clippy_lints/src/map_clone.rs +++ b/clippy_lints/src/map_clone.rs @@ -27,7 +27,9 @@ pub struct Pass; /// /// **Why is this bad?** Readability, this can be written more concisely /// -/// **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:** ///