An announcement post yesterday said that Rust 2018 beta is now in the final phase before release. A new beta has just been released with updates. After bug fixes, the final release will take place on December 6.
In comparison to the Rust 2018 Edition Preview 2, the new Rust 1.31.0 beta includes all of the features stabilized in v1.31.0 207 and many bug fixes.
Those new features are as follows.
Changes in Rust Beta
- The new lifetime elision rules now allow eliding lifetimes in functions and impl headers. Lifetimes are still needed to be defined in structs.
- const functions can now be defined and used. These const functions right now are a strict minimal subset of the const fn RFC.
- Tool lints can now be used, which allow scoping lints from external tools by using attributes.
- With this release, the #[no_mangle] and #[export_name] attributes can be located anywhere in a crate. Previously they could only be located in exported functions.
- Parentheses can now be used in pattern matches.
The compiler change includes updating musl to 1.1.20. There are some library changes and API stabilizations. Now, cargo will download crates in parallel using HTTP/2 protocol. The packages in Cargo.toml can also be renamed now. You can know more about these changes on GitHub.
Changes in tooling
Rust Beta 2018 also includes a number of improvements in the area of tooling. Rustfmt is now at version 1.0. RLS and Clippy will no longer be installed via “preview” components after a rustup update.
The developers have listed two focus areas to find the bugs, namely the module system implementation and the RLS.
Work for next release
In Rust Preview 2, two variants for the module system were evaluated—“anchored paths” vs “uniform paths”. This evaluation continues in this beta release. This means that the compiler accepts only code that both variants would accept.
You can read the announcement post for more details.