Skip to content

Commit 54fdae3

Browse files
committed
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.
2 parents d56677a + 33d1a58 commit 54fdae3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libcore/iter.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@
189189
//! ```
190190
//! let values = vec![1, 2, 3, 4, 5];
191191
//! {
192-
//! let result = match values.into_iter() {
192+
//! let result = match IntoIterator::into_iter(values) {
193193
//! mut iter => loop {
194194
//! match iter.next() {
195195
//! Some(x) => { println!("{}", x); },

0 commit comments

Comments
 (0)