From 5563bd6cc366c1e1596bd65c86f04fa66649e993 Mon Sep 17 00:00:00 2001 From: kennytm Date: Wed, 24 Oct 2018 01:50:18 +0800 Subject: [PATCH] Addressed comments. --- clippy_lints/src/methods/mod.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/clippy_lints/src/methods/mod.rs b/clippy_lints/src/methods/mod.rs index 149e39758ca..e3c704b77ad 100644 --- a/clippy_lints/src/methods/mod.rs +++ b/clippy_lints/src/methods/mod.rs @@ -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 ///