Rust 1.85.0 released, 2024 Edition stabilised

Rust mascot illustrating the release of 1.85.0 of the popular programming language alongside the stabilisation of the 2024 Edition that offers plenty for software developers to play with.

The Rust programming language has reached another milestone with the release of 1.85.0 alongside the stabilisation of the 2024 Edition.

Rust – which is regularly crowned as the “most loved” programming language – continues to empower developers with its reliability, efficiency, and modern development features.

The latest release delivers a host of updates across the language, standard library, cargo, and formatting tools, all while maintaining its backwards compatibility ethos.

Rust 2024 Edition

Editions in Rust allow for opt-in changes that could otherwise introduce backwards incompatibility, ensuring existing projects remain unaffected.

The 2024 Edition is Rust’s most expansive release yet, with significant updates to the language, library, and tooling ecosystem. To help with migration, the team has published a guide along with tools like `cargo fix` for automated adjustments in legacy codebases.

This latest edition introduces modernised language rules, including improved handling of temporary variables, refined patterns for match expressions, and updates to unsafe block usage. Enhancements have also been made to macros, with clearer specification rules and expanded syntax support.

Developers will note several new reserved keywords and syntactic constructions, which future-proof Rust for upcoming features.

The standard library has also matured significantly. Traits such as `Future` and `IntoFuture` have been added to the prelude, delivering a smoother experience for asynchronous programming.

Iteration has received a lift with new features for boxed slices, and stricter rules now govern certain functions to avoid runtime errors. For instance, `std::env::set_var` and related functions are now marked as unsafe, requiring careful handling.

Rust 2024 also introduces asynchronous closures (`async || {}`), a long-awaited feature offering native concurrency without relying on workarounds. This addition streamlines codebases by enabling closures that combine value capture with the power of Rust’s `async` programming.

Rustfmt, the formatting tool, gets smarter with this release. The new “style editions” allow developers to customise formatting independent of their Rust edition, supporting easier upgrades in large teams.

Improved sorting methods for identifiers and numbers enforce consistent structure across projects, backed by fixes to previously confusing formatting behaviour.

‘Cargo’ gets an upgrade

Cargo, Rust’s robust build manager, sees meaningful improvements in version 1.85.0.

Dependency resolution is now Rust-version aware, leveraging the `rust-version` field in crates to ensure compatibility. Teams managing large workspaces will appreciate better handling of default features and more consistency in key naming within `Cargo.toml`.

For projects upgrading to the 2024 Edition, Cargo continues to provide a seamless developer experience. Its ability to spot outdated features, warn of deprecated functionality, and apply conservative fixes guarantees safe and error-free migrations.

Diagnostic and iteration upgrades

Rust 1.85.0 improves developer productivity by enabling more meaningful diagnostics. A new `#[diagnostic::do_not_recommend]` attribute lets library authors suppress misleading compiler suggestions, ensuring error messages only guide developers in the right direction.

This release also expands the capabilities of collections. Developers can now directly populate multiple collections, such as vectors and lists, using tuple destructuring with iterators. Tuple support has been extended to lengths of up to 12 items, making it even easier to work with complex datasets.

Expanded API stabilisation

Several APIs that were previously unstable or restricted to nightly builds are now fully stable in version 1.85.0. These include:

  • Core utilities such as `std::mem::size_of_val` and `std::mem::swap`, now supported in `const` contexts.
  • Mathematical operations like `max`, `min`, `clamp`, and others for floating-point types.
  • `std::task::Waker::noop` provides a simple workaround for tasks that do not require wake-up behaviour.

These changes, coupled with simplified error handling and new type implementations, continue Rust’s tradition of developer-first thinking.

This latest release sets the foundation for even greater advancements in the years to come. As always, the Rust community plays a vital role in the language’s progress, and developers are encouraged to test new features, report issues, and contribute to its vibrant ecosystem.

Scroll to Top

Contact Us

Please enter the details below to get in touch with us!