Ce contenu n'est pas disponible dans la langue sélectionnée.

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_unsafe and dependency_on_unit_never_type_fallback lints 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_use lint no longer warns when you ignore Result<(), UninhabitedType> (for example, Result with the never type as the error type) or ControlFlow values 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].
  • 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=no if 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.
  • Standard library:

    • iter::Repeat::last and iter::Repeat::count now 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 corresponding Rc and Arc methods, and btree_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_arguments lint is deny-by-default and is reported in dependencies. Invalid arguments to #[macro_export] now fail to compile.
    • Downstream impl DerefMut for Pin is no longer permitted.
    • Temporary lifetime extension no longer applies to arguments of non-extended pin! and formatting macros in some cases.

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.

Red Hat logoGithubredditYoutubeTwitter

Apprendre

Essayez, achetez et vendez

Communautés

À propos de Red Hat

Nous proposons des solutions renforcées qui facilitent le travail des entreprises sur plusieurs plates-formes et environnements, du centre de données central à la périphérie du réseau.

Rendre l’open source plus inclusif

Red Hat s'engage à remplacer le langage problématique dans notre code, notre documentation et nos propriétés Web. Pour plus de détails, consultez le Blog Red Hat.

À propos de la documentation Red Hat

Legal Notice

Theme

© 2026 Red Hat
Retour au début