Auto merge of #3573 - Vlad-Shcherbina:map_clone_caveat, r=flip1995
Document map_clone known problems #498 (cherry picked from commitada0d2c548
) This was lost in relicensing (057243f16b
). However, I [acknowledged](https://github.com/rust-lang/rust-clippy/issues/3099#issuecomment-416482309) relicensing so this cherry pick should be fine I guess.
This commit is contained in:
commit
52820e588f
1 changed files with 3 additions and 1 deletions
|
@ -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:**
|
||||
///
|
||||
|
|
Loading…
Add table
Reference in a new issue