Software 43941 Published by

Rust has released its latest stable version, 1.92.0, which can be updated using the command $ rustup update stable for users already set up with rustup. Alternatively, those without rustup can download it from the official website along with full release notes. One key change in this version is the introduction of deny-by-default never type lints, intended to ensure future compatibility and prevent code patterns that may cause issues once "never" types become stable. Additionally, improvements have been made to unwinding on Linux systems and attribute checking for macros, among other updates and stabilization of certain language features.



Rust 1.92.0 released

Rust's latest stable release is out, version 1.92.0. Here’s how you can get it if you're using rustup already: Simply run $ rustup update stable. This straightforward command pulls down the newest reliable code.

If your setup doesn't include rustup, don't worry about it; the tool itself is available from Rust's official website, alongside full release notes for 1.92.0 if you want to dig in. But beyond updating to stability, there are also paths for testing ahead-of-schedule features or joining development efforts directly.

One big change involves deny-by-default never type lints. The teams responsible for the language and its compiler have been steadily working towards incorporating the concept of "never" types properly into Rust's core behavior. As part of that process, 1.92.0 brings several future compatibility lints along with it by marking them as deny-by-default. These particular flags help catch code patterns that are likely to cause problems once those never types become stable and usable.

While silencing these warnings is possible using attributes like #[allow], fixing the underlying issues they point to is strongly recommended. A lot of crates, roughly 500 currently, will trip over this new rule, but there's a solid explanation from Rust's development crew detailing why it was deemed necessary despite the potential hassle.

Also worth mentioning is an adjustment to the unused_must_use lint behavior. Before, it would flag situations where you ignored the return value of a function marked with #[must_use]. However, this sometimes caught cases where the error case for such functions just couldn't occur because its type was empty, like functions returning Result<T, !> (where ! is uninhabited). Rust 1.92.0 updates how it handles that specific scenario: now it avoids triggering warnings unnecessarily by not complaining about functions whose designated error can't possibly happen.

Think of a function declared as fn always_works() -> Result<(), Infallible>. Calling it and ignoring the result isn't actually problematic, and this new handling prevents false alarms. The compiler recognizes that certain return types are impossible to fail because their failure state is non-existent, effectively making the #[must_use] warning more precise.

Moving on from lints entirely, there's an improvement concerning unwinding in specific situations on Linux systems. Unwinding refers to the process of building a stack trace when something goes wrong (a panic). An older setting called -Cpanic=abort, which told Rust not to unwind and instead immediately abort execution, caused existing backtrace features to break if mixed with newer code generation rules.

Rust 1.92.0 fixes this interaction by ensuring proper unwind tables are generated even when you explicitly request -Cpanic=abort. Now specifying -Cpanic=abort won't interfere negatively with the ability to produce useful stack traces using standard debugging tools, making error diagnosis more reliable regardless of panic handling choices.

Finally, let's touch on compiler internals and consistency: work has been done improving how Rust checks input for attributes associated with macros when they're defined via #[macro_export]. This stricter validation means better errors are reported if you use invalid macro arguments or attributes in your own code. The goal is to make the diagnostic messages clearer and more dependable, especially around built-in features like certain macro-related syntax.

On another note related to Rust's evolution process: some parts of the language have been officially designated stable in 1.92.0. This includes API functions from NonZero (like .div_ceil) that can now operate reliably within constant contexts, and various methods pulled from the btree_map module alongside updates to proc_macro_token_stream. Marking these as stable helps define what parts of Rust's interface are considered safe for general use.

Announcing Rust 1.92.0 | Rust Blog

Empowering everyone to build reliable and efficient software.

Announcing Rust 1.92.0 | Rust Blog