2 ms·
Other than what other people said, the question is to why that desugaring is chosen, not that it's because of a specific one. That is, why let mut iter = Int
by steveklabnik 2y ago
Other than what other people said, the question is to why that desugaring is chosen, not that it's because of a specific one. That is, why
let mut iter = IntoIterator::into_iter(y);
instead of
let mut iter = y.into_iter();
That could have been done, but it wasn't.
> Otherwise you'd be writing methods with absolutely no idea how the language would interact with it.
Right, this is what's guessed, because it makes the most sense.