3 ms·
Right, but the point is that you can do that as of 1.53.0, you didn't have to wait until this release and the edition to do it.
by steveklabnik 5y ago
Right, but the point is that you can do that as of 1.53.0, you didn't have to wait until this release and the edition to do it.
- tialaramex 5y agoYou know all this, but while some obvious things work in 1.53.0 one important thing causes scary warnings because it is shadowed by the back compat hack. "for x in myArray" works fine, just like "for x in myVector" but whereas "myVector.into_iter().foo()" does what you expect, "myArray.into_iter().foo() is actually giving foo an iterator over the references just as it would have in 2017 and now produces a warning about this into the bargain. In Rust 2021 myArray.into_iter() does what a modern Rust programmer expects it to do, provide an iterator over myArray itself. The warning does explain how you can get that iterator in 1.53.0 of course, but you need to write some ugly syntax whereas in Rust 2021 the obvious syntax just does what you expect as if arrays had always been IntoIterator.