Questo contenuto non è disponibile nella lingua selezionata.

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.
Torna in cima
Red Hat logoGithubredditYoutubeTwitter

Formazione

Prova, acquista e vendi

Community

Informazioni sulla documentazione di Red Hat

Aiutiamo gli utenti Red Hat a innovarsi e raggiungere i propri obiettivi con i nostri prodotti e servizi grazie a contenuti di cui possono fidarsi. Esplora i nostri ultimi aggiornamenti.

Rendiamo l’open source più inclusivo

Red Hat si impegna a sostituire il linguaggio problematico nel codice, nella documentazione e nelle proprietà web. Per maggiori dettagli, visita il Blog di Red Hat.

Informazioni su Red Hat

Forniamo soluzioni consolidate che rendono più semplice per le aziende lavorare su piattaforme e ambienti diversi, dal datacenter centrale all'edge della rete.

Theme

© 2025 Red Hat