Rust 1.81.0 released: stabilized `Error` trait, enhanced sorting, and new lint features
The Rust team has released version 1.81.0, featuring key updates such as the stabilization of the Error trait in the core library, making it available for #![no_std] libraries. This change standardizes the Error trait across various environments. The standard library now includes improved sorting algorithms for both stable and unstable sorting, which boosts runtime performance and compilation speed. These new sorting algorithms will also panic when encountering incorrect Ord implementations, helping developers audit their code for proper ordering behavior.
The #[expect] lint level has been stabilized, allowing developers to temporarily silence specific lints while providing warnings if the lint no longer triggers. This feature is useful during codebase refactoring, such as when transitioning to comply with Clippy lints like undocumented_unsafe_blocks. Additionally, two new Clippy lints, clippy::allow_attributes and clippy::allow_attributes_without_reason, have been introduced to enforce the use of #[expect] and to require reasons for #[allow] attributes. Providing explanations for lint level adjustments is essential for helping new developers understand the rationale behind these changes.
New users can install Rust via Rustup from the official website. Developers can test upcoming versions using rustup default beta or rustup default nightly.