Rust has different editions. The oldest edition is Rust 2015. The current version is Rust 2018. There is a planned release for Rust 2021. When will Rust 2015 be end of life and unsupported by rustc?
Rust has different editions. The oldest edition is Rust 2015. The current version is Rust 2018. There is a planned release for Rust 2021. When will Rust 2015 be end of life and unsupported by rustc?
The official docs claim official editions will keep getting updates.
Compatibility
When a new edition becomes available in the compiler, crates must explicitly opt in to it to take full advantage. This opt in enables editions to contain incompatible changes, like adding a new keyword that might conflict with identifiers in code, or turning warnings into errors. A Rust compiler will support all editions that existed prior to the compiler's release, and can link crates of any supported editions together. Edition changes only affect the way the compiler initially parses the code. Therefore, if you're using Rust 2015, and one of your dependencies uses Rust 2018, it all works just fine. The opposite situation works as well.
Just to be clear: most features will be available on all editions. People using any edition of Rust will continue to see improvements as new stable releases are made. In some cases however, mainly when new keywords are added, but sometimes for other reasons, there may be new features that are only available in later editions. You only need to upgrade if you want to take advantage of such features.
(emphasis added)
An edition of Rust is timeless, the implementation will hit EOL. This from Programming Rust Second Edition,
Any code that compiled on Rust 1.0 must compile just as well on Rust 1.50 or, if it's ever released, Rust 1.900. [...] Rust promises that the compiler will accept all extant editions of the language, and programs can freely mix creates written in different editions.
So basically rustc is under semvar*. When an edition of Rust has fallen into disuse, rustc reserves the right to drop support for that specific edition of Rust. When this happens they'll bump the major version and we'll have rustc version 2.0.
Until then assume that all editions of Rust will be supported by rustc.
This isn't entirely true, there are some exceptions like the one mentioned in the blog post announcing Rust 2021
Instead, we decided to add the trait implementation in all editions (starting in Rust 1.53.0), but add a small hack to avoid breakage until Rust 2021. In Rust 2015 and 2018 code, the compiler will still resolve array.into_iter() to (&array).into_iter() like before, as if the trait implementation does not exist. This only applies to the
.into_iter()method call syntax. It does not affect any other syntax such asfor e in [1, 2, 3],iter.zip([1, 2, 3])orIntoIterator::into_iter([1, 2, 3]). Those will start to work in all editions.
This means you can write code in Rust 1.53.0 for Eddition 2018 which does not work in code compiled in Rust 1.52.0. However likely that is, I'm not sure.