Este conteúdo não está disponível no idioma selecionado.
Chapter 5. Changes in Rust 1.92.0 Toolset
Red Hat Enterprise Linux provides Rust Toolset at version 1.92.0. The previous version was 1.88.0.
Language:
-
The
never_type_fallback_flowing_into_unsafeanddependency_on_unit_never_type_fallbacklints are deny-by-default. They report code that is likely to break when the never type is stabilized. You can allow these lints, but you should fix affected code when they are reported. -
The
unused_must_uselint no longer warns when you ignoreResult<(), UninhabitedType>(for example,Resultwith the never type as the error type) orControlFlowvalues whose error variant cannot be constructed. - You can use &raw [mut | const] on union fields in safe code.
- You can combine #[track_caller] and #[no_mangle] when every declaration of the function specifies #[track_caller].
-
The
Compiler:
-
On Linux, unwind tables are emitted by default even when you build with
-C panic=abort, so backtraces work again. Use-C force-unwind-tables=noif you must omit unwind tables. - On Red Hat Enterprise Linux 10, Rust 1.92 is built against LLVM 21 through LLVM Toolset. When you install Rust Toolset, ensure that LLVM Toolset provides LLVM 21.
-
On Linux, unwind tables are emitted by default even when you build with
Standard library:
-
iter::Repeat::lastanditer::Repeat::countnow panic instead of looping indefinitely. -
Stabilized APIs include
NonZero::div_ceil,Location::file_as_c_str,RwLockWriteGuard::downgrade,Box::new_zeroed,Box::new_zeroed_slice, and correspondingRcandArcmethods, andbtree_map::Entry::insert_entry.
-
Cargo and Rustdoc:
- The Cargo book adds an Optimizing Build Performance chapter.
- Rustdoc search hides trait impl items when the trait item is already shown, and relaxes rules for identifiers in search.
Compatibility notes:
-
The
invalid_macro_export_argumentslint is deny-by-default and is reported in dependencies. Invalid arguments to #[macro_export] now fail to compile. -
Downstream
impl DerefMut for Pinis no longer permitted. - Temporary lifetime extension no longer applies to arguments of non-extended pin! and formatting macros in some cases.
-
The
For more information, see the Rust 1.92.0 release announcement and the upstream Rust 1.92.0 release notes.
Rust Toolset is a rolling Application Stream, and Red Hat only supports the latest version. For more information, see the Red Hat Enterprise Linux Application Streams Life Cycle document.