Announcing Rust 2018 Preview 2

Today marks another milestone toward Rust 2018: we’re announcing the 2018 Edition Preview 2 . Like the last preview, this is an alpha-quality preview of Rust 2018 intended for testing and feedback. It is only available on the nightly release channel. Compared to Preview 1, we’ve made a number of changes:

  • The cargo fix command, used during migration, is now a built-in part of Cargo, which further streamlines the migration process.

  • Extensive work has gone in to fix and polish the lints that help you migrate. At this point we expect a smooth experience for the majority of crates. If you have any problems during migration, please file an issue.

  • The module system changes have been broken into several smaller features with independent tracking issues for feedback and discussion:

    • Changes to the way that paths in use statements work (tracked here). There are two variants of the design we’re collecting feedback on, see the Edition Guide for detail; we’re especially seeking feedback on the #![feature(uniform_paths)] variant, new in Preview 2.
    • No longer requiring for parent modules (tracked here).
    • No longer requiring extern crate for including dependencies (tracked here).
    • Supporting crate as a visibility modifier (tracked here. Given feedback so far, this feature is unlikely to be stabilized for Rust 2018.
  • NLL has been enabled by default, in migration mode:

    • If your code is accepted by NLL, then we accept it.
    • If your code is rejected by both NLL and the old borrow checker, then we reject it.
    • If your code is rejected by NLL but accepted by the old borrow checker, then we emit the new NLL errors as warnings.
    • Please report warnings you encounter that you think are wrong!
  • In-band lifetimes have been split up

    • Complete elision in headers (impl Debug for &MyType) still in, tracked here.
    • Anything beyond that has been removed from the 2018 edition feature gate, due to mixed feedback (tracked here)
  • Both rustfmt and the RLS have reached 1.0 “release candidate” status. Look for more information about that soon.

What this milestone means

We have now entered the final release cycle before Rust 2018 goes into beta. By the end of this release cycle (September 13th), we need to have reached final stabilization decisions for the remaining features. The last major feature that is still not fully nailed down is the module system changes, particularly the precise approach to paths .

At the end of this cycle we will produce Rust 1.30 Beta, which will have all the Rust 2018 features stabilized, including the feature gate for the 2018 Edition itself . At that point we will make a high profile announcement and look for feedback on the quality of the overall product (but not on which features to ship). We will continue this beta into 1.31, giving us three months of final testing, feedback, and polish before releasing Rust 2018 to the world on December 6th.


The address of the link “The cargo fix command” currently doesn’t work. It seems like the new address is

1 Like