diff options
| author | bors <bors@rust-lang.org> | 2018-12-22 15:02:50 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-12-22 15:02:50 +0000 |
| commit | 52820e588f218184c62ccc51ed60240f75365d09 (patch) | |
| tree | d6f196a4d04d14aadf399a24e20b77251153f639 | |
| parent | d9cc71fc421da370d8b19a369ffa127cb17c2536 (diff) | |
| parent | d2c069de1e85cf6d236d040a5be4021092bfdb57 (diff) | |
| download | rust-52820e588f218184c62ccc51ed60240f75365d09.tar.gz rust-52820e588f218184c62ccc51ed60240f75365d09.zip | |
Auto merge of #3573 - Vlad-Shcherbina:map_clone_caveat, r=flip1995
Document map_clone known problems #498 (cherry picked from commit ada0d2c54831a904a53ff4106e0ebb6a0f06a687) This was lost in relicensing (057243f16b4f4233). However, I [acknowledged](https://github.com/rust-lang/rust-clippy/issues/3099#issuecomment-416482309) relicensing so this cherry pick should be fine I guess.
| -rw-r--r-- | clippy_lints/src/map_clone.rs | 4 |
1 files changed, 3 insertions, 1 deletions
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:** /// |
