Editions

The concept of editions was introduced in 2018 to allow stability without stagnation. They provide a way to make changes to the language that would otherwise be backwards incompatible, which would violate Rust's stability guarantees. Editions permit changes to syntax and semantics, but not the standard library of Rust. Because editions are opt-in on a per-crate basis and can interoperate with each other, there is no risk of an ecosystem split.

Current Editions
Currently there are two Rust editions:


 * Rust 2015, named after the release year of Rust 1.0, is the default edition, which is used if no edition is specified.
 * Rust 2018 is available since Rust version 1.31. All versions since then support both editions. This means that crates using the 2018 edition can depend on crates using the 2015 edition and vice versa.

Timeline of the 2018 Edition
Developing and releasing the 2018 edition involved a lot of planning and work from many parts of the Rust community. Here's a summary of the events:


 * In June 2017, the RFC proposing the concept of editions was published.
 * In September 2017, the RFC was accepted.
 * In July 2018, the plans to make a 2018 edition were announced for the first time on the Rust blog.
 * In September, Rust 1.29 was released, which shipped the  command to automatically migrate a project to the 2018 edition.
 * In October, Rust 1.30 was released, which shipped raw identifiers, so newly introduced keywords can be escaped.
 * In November, the redesigned website went online.
 * In December 2018, Rust 1.31, containing the 2018 edition, was released.

What changed with Rust 2018
This is a summary. More information can be found in the edition guide and in the Rust 2018 announcement.

Changes specific to the 2018 edition
The following features were released in Rust 1.31, unless a different version is indicated, and are (or were initially) only available in the 2018 edition:


 * The  and   keywords were reserved
 * the  keyword was reserved and   became a strict keyword.
 * Module paths were reworked, to make them simpler and more intuitive.
 * Anonymous trait parameters were deprecated.
 * Non-lexical lifetimes were introduced to make borrow checking more correct, permissive and provide better error messages.
 * They were backported to the 2015 edition in Rust 1.36.
 * The  operator   (matching at most one item) was added in Rust 1.32
 * It was backported to to the 2015 edition in Rust 1.37.
 * / was stabilized in Rust 1.39.

Other changes associated with Rust 2018
These changes are available in the 2015 edition as well, but were advertised together with the above features, because they were released around the same time:

Language changes

 * Improved lifetime elision
 * Raw identifiers
 * Attribute- and function-like procedural macros
 * applications
 * applications

Tools

 * , Rusts code formatter
 * , Rusts linter

Governance

 * A new edition of the book "The Rust Programming Language" was released
 * The website was redesigned
 * The Domain Working Groups for Network Services, Command-line applications, WebAssembly and Embedded devices were announced