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:
@@ -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); },
|
||||||
|
|||||||
Reference in New Issue
Block a user