]> git.lizzy.rs Git - rust.git/commitdiff
Make for loop desugaring for iterators more precise
authorUlrik Sverdrup <bluss@users.noreply.github.com>
Sat, 27 Feb 2016 16:32:20 +0000 (17:32 +0100)
committerUlrik Sverdrup <bluss@users.noreply.github.com>
Sat, 27 Feb 2016 16:33:20 +0000 (17:33 +0100)
The UFCS call IntoIterator::into_iter() is used by the for loop.

src/libcore/iter.rs

index 96302acb8d960f1c94b8691ca4c0f2e5d83279ba..d6bd9dbf4bde222938fdcefead9918e7f30925db 100644 (file)
 //! ```
 //! 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); },