From ada0d2c54831a904a53ff4106e0ebb6a0f06a687 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 --- 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 e126d5c07d70..8403974629d6 100644 --- a/clippy_lints/src/map_clone.rs +++ b/clippy_lints/src/map_clone.rs @@ -10,7 +10,9 @@ use utils::{is_adjusted, iter_input_pats, match_qpath, match_trait_method, match /// **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