what's new in the latest release of rust lang
- User
what's new in the latest release of rust lang
Assistant
The latest release of Rust is version 1.85.0, which was announced on February 20, 2025. Here are the key new features and changes in this release:
Rust 2024 Edition
Rust 1.85.0 stabilizes the Rust 2024 Edition, which includes several significant changes[2]:
-
Language changes:
- New lifetime capture rules for return position impl Trait (RPIT)
- Changes to temporary scopes in
if letand tail expressions externblocks now require theunsafekeyword- The
unsafe_op_in_unsafe_fnlint now warns by default - Disallowing references to
static mut - Changes to never type (
!) fallback behavior
-
Standard library updates:
FutureandIntoFutureadded to the preludeIntoIteratorimplementation forBox<[T]>
-
Cargo improvements:
- New Rust-version aware resolver considering the
rust-versionfield - Changes to dependency resolution for workspace dependencies
- New Rust-version aware resolver considering the
-
Rustdoc enhancements:
- Doctests are now combined into a single executable for improved performance
Other Notable Changes
-
The new trait solver is now used for checking coherence of trait implementations, improving correctness and allowing more code to be written in some cases[4].
-
Cargo now considers minimum supported Rust versions (MSRV) when selecting dependency versions, making it easier for maintainers to support older toolchains[4].
These changes represent significant improvements to the Rust language, its standard library, and associated tools, enhancing performance, safety, and developer experience[2][4].
-
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.