Chapter 5. Changes in Rust 1.62.1 Toolset


Rust Toolset has been updated from version 1.58.0 to 1.62.1 on RHEL 7, RHEL 8, and RHEL 9.

Notable changes include:

  • Destructuring assignment allows patterns to assign to existing variables in the left-hand side of an assignment. For example, a tuple assignment can swap to variables: (a, b) = (b, a);
  • Inline assembly is now supported on 64-bit x86 and 64-bit ARM using the core::arch::asm! macro. See more details in the "Inline assembly" chapter of the reference, "/usr/share/doc/rust/html/reference/inline-assembly.html". (online at https://doc.rust-lang.org/reference/inline-assembly.html)
  • Enums can now derive the Default trait with an explicitly annotated #[default] variant.
  • Mutex, CondVar, and RwLock now use a custom futex-based implementation rather than pthreads, with new optimizations made possible by Rust language guarantees.
  • Rust now supports custom exit codes from main, including user-defined types that implement the newly-stabilized Termination trait.
  • Cargo supports more control over dependency features. The "dep:" prefix can refer to an optional dependency without exposing that as a feature, and a "?" only enables a dependency feature if that dependency is enabled elsewhere, like "package-name?/feature-name".
  • Cargo has a new cargo add subcommand for adding dependencies to Cargo.toml.

For detailed information regarding the updates, see the series of upstream release announcements:

Back to top
Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Theme

© 2025 Red Hat, Inc.