Skip to content

Commit 52820e5

Browse files
committed
Auto merge of #3573 - Vlad-Shcherbina:map_clone_caveat, r=flip1995
Document map_clone known problems #498 (cherry picked from commit ada0d2c) This was lost in relicensing (057243f). However, I [acknowledged](rust-lang/rust-clippy#3099 (comment)) relicensing so this cherry pick should be fine I guess.
2 parents d9cc71f + d2c069d commit 52820e5

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
@@ -27,7 +27,9 @@ pub struct Pass;
2727
///
2828
/// **Why is this bad?** Readability, this can be written more concisely
2929
///
30-
/// **Known problems:** None.
30+
/// **Known problems:** Sometimes `.cloned()` requires stricter trait
31+
/// bound than `.map(|e| e.clone())` (which works because of the coercion).
32+
/// See [#498](https://github.com/rust-lang-nursery/rust-clippy/issues/498).
3133
///
3234
/// **Example:**
3335
///

0 commit comments

Comments
 (0)