The Rust Staff has launched Rust 1.83, an replace to the memory-safe and thread-safe programming language that brings expanded capabilities for code working in const
contexts. The Rust Staff additionally introduced that it’s shifting ahead with the Rust 2024 version, which introduces backwards-incompatible options akin to gen
blocks.
Builders with a earlier version of Rust put in through rustup
can replace to Rust 1.83 with the command rustup replace steady
.
With Rust 1.83, introduced November 28, a number of massive extensions are featured for const
contexts. This refers to code the compiler evaluates at compile time: the preliminary worth of const
and static
gadgets, array lengths, enum discriminant values, const generic arguments, and features callable from these contexts (const fn
). Beforehand, const
contexts apart from the initializer expression of a static
merchandise have been forbidden from referencing static gadgets. This limitation has been lifted.