2 ms·
Rust editions can technically change some aspects of the language semantics, but this ability is used sparingly. An example is how the `iter` method on fixed-si
by kibwen 4y ago
Rust editions can technically change some aspects of the language semantics, but this ability is used sparingly. An example is how the `iter` method on fixed-size arrays changed in the most recent edition. As long as code from all editions can still be used together, a semantic change is possible.
- tialaramex 4y ago> An example is how the `iter` method on fixed-size arrays changed in the most recent edition. Can you explain? The array type doesn't have an iter() method. It will coerce into a slice, which does have an iter() method, but doesn't care whether it's an array we're slicing.
- kibwen 4y agoI was misremembering, it was `into_iter` rather than `iter` that was changed. The documentation for the change can be found here: https://doc.rust-lang.org/edition-guide/rust-2021/IntoIterator-for-arrays.html https://doc.rust-lang.org/edition-guide/rust-2021/IntoIterat...
- deleted 4y ago[deleted]