此内容没有您所选择的语言版本。

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

学习

尝试、购买和销售

社区

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

关于红帽文档

Legal Notice

Theme

© 2026 Red Hat
返回顶部