From 33d1a5800123924f00d7360858bef3807005c473 Mon Sep 17 00:00:00 2001 From: Ulrik Sverdrup Date: Sat, 27 Feb 2016 17:32:20 +0100 Subject: [PATCH] Make for loop desugaring for iterators more precise The UFCS call IntoIterator::into_iter() is used by the for loop. --- src/libcore/iter.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcore/iter.rs b/src/libcore/iter.rs index 96302acb8d960..d6bd9dbf4bde2 100644 --- a/src/libcore/iter.rs +++ b/src/libcore/iter.rs @@ -189,7 +189,7 @@ //! ``` //! let values = vec![1, 2, 3, 4, 5]; //! { -//! let result = match values.into_iter() { +//! let result = match IntoIterator::into_iter(values) { //! mut iter => loop { //! match iter.next() { //! Some(x) => { println!("{}", x); },