Paul Krill
Editor at Large

Rust 1.92 touts deny-by-default never type lints

news
Dec 12, 20252 mins

In addition to ongoing work to stabilize the never type, unwind tables are now emitted by default and some lint warnings have been disabled.

A rusty crown sits on an anvil.
Credit: AL-art/Shutterstock

Rust 1.92, the latest version of the Rust programming language, emphasizes deny-by-default never type lints for compilation.

The update was unveiled by the Rust release team on December 11. Developers can upgrade to version 1.92 by running $ rustup update stable. The release team noted that, with this release, the language and compiler teams continued to work on stabilizing the never type, which represents computations that never resolve to any value.

With the 1.92 release, the never_type_fallback_flowing_into_unsafe and dependency_on_unit_never_type_fallback future compatibility lints were made deny-by-default, so they will cause a compilation error when detected. While these future compatibility lints will result in compilation errors, they can still be #[allow]ed. The release team emphasized that the lints detect code that will likely be broken by the never type stabilization, and advised the code should be fixed if reported. The lints only fire when building the affected crates directly, not when they are built as dependencies.

Also in Rust 1.92, The unused_must_use lint no longer warns on Result<(), UninhabitedType>, or ControlFlow<UninhabitedType, ()>. For instance, it will not warn on Result<(), Infallible>, avoiding the need to check for an error that will never happen.

Elsewhere in Rust 1.92, the release team reported, unwind tables are now emitted by default even when -Cpanic=abort is specified, allowing for backtraces to work properly. Developers may use -Cforce-unwind-tables=no to explicitly disable unwind tables if necessary. It was also noted that the past few releases brought many changes to the way built-in attributes are processed in the compiler. These updates should improve Rust error messages and warnings for built-in attributes, and will especially make these diagnostics more consistent among all of the more than 100 built-in Rust attributes.

Rust 1.92 also features stabilized APIs such as Location::file_as_c_str, Rc::new_zeroed, and Arc::new_zeroed_slice.

This latest release follows the October 30 release of Rust 1.91, which promoted Windows on Arm64 platform to a Tier 1 supported target. A subsequent point release, Rust 1.91.1, was unveiled November 10, featuring two regression fixes for Rust 1.91. These fixes addressed linker and runtime errors on WebAssembly, as well as Cargo target directory locking.

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author