Skip to content

Commit

Permalink
Addressed comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
kennytm committed Nov 2, 2018
1 parent 2b2acf1 commit 5563bd6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions clippy_lints/src/methods/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -749,11 +749,11 @@ declare_clippy_lint! {
/// `iter_mut`.
///
/// **Why is this bad?** Arrays and `PathBuf` do not yet have an `into_iter` method which move out
/// their content into an iterator. Calling `into_iter` instead just forwards to `iter` or
/// `iter_mut` due to auto-referencing, of which only yield references. Furthermore, when the
/// standard library actually [implements the `into_iter` method][25725] which moves the content out
/// of the array, the original use of `into_iter` got inferred with the wrong type and the code will
/// be broken.
/// their content into an iterator. Auto-referencing resolves the `into_iter` call to its reference
/// instead, like `<&[T; N] as IntoIterator>::into_iter`, which just iterates over item references
/// like calling `iter` would. Furthermore, when the standard library actually
/// [implements the `into_iter` method][25725] which moves the content out of the array, the
/// original use of `into_iter` got inferred with the wrong type and the code will be broken.
///
/// **Known problems:** None
///
Expand Down

0 comments on commit 5563bd6

Please sign in to comment.