Skip to content

Commit 9a5f25a

Browse files
authored
Merge pull request #2370 from Vlad-Shcherbina/patch-1
Document map_clone known problems #498
2 parents 41ea14d + ada0d2c commit 9a5f25a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

clippy_lints/src/map_clone.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ use utils::{is_adjusted, iter_input_pats, match_qpath, match_trait_method, match
1010
/// **Why is this bad?** It makes the code less readable than using the
1111
/// `.cloned()` adapter.
1212
///
13-
/// **Known problems:** None.
13+
/// **Known problems:** Sometimes `.cloned()` requires stricter trait
14+
/// bound than `.map(|e| e.clone())` (which works because of the coercion).
15+
/// See [#498](https://github.com/rust-lang-nursery/rust-clippy/issues/498).
1416
///
1517
/// **Example:**
1618
/// ```rust

0 commit comments

Comments
 (0)