Skip to content

Commit a67edf9

Browse files
committed
Addressed comments.
1 parent 587adba commit a67edf9

File tree

1 file changed

+5
-5
lines changed
  • clippy_lints/src/methods

1 file changed

+5
-5
lines changed

clippy_lints/src/methods/mod.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -742,11 +742,11 @@ declare_clippy_lint! {
742742
/// `iter_mut`.
743743
///
744744
/// **Why is this bad?** Arrays and `PathBuf` do not yet have an `into_iter` method which move out
745-
/// their content into an iterator. Calling `into_iter` instead just forwards to `iter` or
746-
/// `iter_mut` due to auto-referencing, of which only yield references. Furthermore, when the
747-
/// standard library actually [implements the `into_iter` method][25725] which moves the content out
748-
/// of the array, the original use of `into_iter` got inferred with the wrong type and the code will
749-
/// be broken.
745+
/// their content into an iterator. Auto-referencing resolves the `into_iter` call to its reference
746+
/// instead, like `<&[T; N] as IntoIterator>::into_iter`, which just iterates over item references
747+
/// like calling `iter` would. Furthermore, when the standard library actually
748+
/// [implements the `into_iter` method][25725] which moves the content out of the array, the
749+
/// original use of `into_iter` got inferred with the wrong type and the code will be broken.
750750
///
751751
/// **Known problems:** None
752752
///

0 commit comments

Comments
 (0)