Rust 1.83 Released, Rust 2024 Edition to Arrive in February 2025 with Backwards-Incompatible Features

Elliot Kim

Elliot Kim

December 03, 2024 · 3 min read
Rust 1.83 Released, Rust 2024 Edition to Arrive in February 2025 with Backwards-Incompatible Features

The Rust Team has released Rust 1.83, the latest update to the memory-safe and thread-safe programming language, which brings significant improvements to code running in const contexts. Alongside this release, the team has also announced that the Rust 2024 edition will ship in Rust 1.85, expected to arrive in February 2025, introducing backwards-incompatible features that aim to make the language more consistent, ergonomic, and safe.

Rust 1.83, announced on November 28, focuses on expanding capabilities for code in const contexts, which refers to code evaluated by the compiler at compile time. This includes the initial value of const and static items, array lengths, enum discriminant values, const generic arguments, and functions callable from these contexts (const fn). Previously, const contexts, except for the initializer expression of a static item, were forbidden from referencing static items. With Rust 1.83, this limitation has been lifted, allowing for more flexibility in const contexts.

However, the Rust Team notes that certain limitations still apply. Reading the value of a mutable or interior mutable static is still not permitted in const contexts, and the final value of a constant may not reference mutable or interior mutable statics. These restrictions ensure that constants remain "constant." Nevertheless, a constant is now allowed to evaluate to a raw pointer that points to a mutable or interior mutable static, and mutable references can be used in const contexts. Additionally, mutable raw pointers and interior mutability are now supported.

The Rust 2024 edition, set to arrive in Rust 1.85, promises to bring significant improvements to the language. The feature-complete edition has recently been merged to the release train for Rust 1.85 and is expected to enter the beta channel on January 9, 2025. The Rust Team is encouraging users to migrate their projects to the new edition, providing instructions on how to do so in the Rust blog. The Rust 2024 edition will introduce long-awaited features such as gen blocks, let chains, and the never (!) type, which aim to enhance the language's consistency, ergonomics, and safety.

The release of Rust 1.83 and the upcoming Rust 2024 edition marks a significant milestone in the evolution of the Rust programming language. As the language continues to mature, it's likely to attract more developers and projects, further solidifying its position as a reliable and efficient choice for building robust and secure software.

Developers who have installed a previous edition of Rust via rustup can update to Rust 1.83 using the command rustup update stable. With the Rust 2024 edition on the horizon, it's an exciting time for the Rust community, and developers are encouraged to explore the new features and improvements in the latest releases.

Similiar Posts

Copyright © 2024 Starfolk. All rights reserved.