The Rust language team has released update 1.31. They also named this release Rust 2018. It brings together all the improvements and changes prepared in the last three years, and updated the documentation, support of the working environments and the website. And the first stable version of the language, Rust 1.0, was named by the developers Rust 2015 to clearly indicate the difference between the two major versions of the language.
In projects on Rust, you can switch the used version of the language, 2015 or 2018. So you can achieve maximum compatibility of the project with the version of Rust.
The new version differs from Rust 2015 with several improvements:
- Non-Lexical Lifetimes. Rust developers modified the borrowing test. It helps to prevent hanging links and other problems with memory management. In Rust 2018, borrowing verification has become smarter: it now tracks the moment when a variable stops using data, and does not block other requests for this data after that.
- System of modules. Changed the work paths that are accessed in namespaces. Now most often the use of extern crate is not required. Absolute paths begin with the name of the crate, where the crate keyword refers to the current crate.