Auto merge of #31942 - bluss:iter-desugar, r=steveklabnik

Make for loop desugaring for iterators more precise

The UFCS call IntoIterator::into_iter() is used by the for loop.
This commit is contained in:
bors
2016-02-27 22:33:29 +00:00

View File

@@ -189,7 +189,7 @@
//! ``` //! ```
//! let values = vec![1, 2, 3, 4, 5]; //! let values = vec![1, 2, 3, 4, 5];
//! { //! {
//! let result = match values.into_iter() { //! let result = match IntoIterator::into_iter(values) {
//! mut iter => loop { //! mut iter => loop {
//! match iter.next() { //! match iter.next() {
//! Some(x) => { println!("{}", x); }, //! Some(x) => { println!("{}", x); },