Este conteúdo não está disponível no idioma selecionado.

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.
Voltar ao topo
Red Hat logoGithubredditYoutubeTwitter

Aprender

Experimente, compre e venda

Comunidades

Sobre a documentação da Red Hat

Ajudamos os usuários da Red Hat a inovar e atingir seus objetivos com nossos produtos e serviços com conteúdo em que podem confiar. Explore nossas atualizações recentes.

Tornando o open source mais inclusivo

A Red Hat está comprometida em substituir a linguagem problemática em nosso código, documentação e propriedades da web. Para mais detalhes veja o Blog da Red Hat.

Sobre a Red Hat

Fornecemos soluções robustas que facilitam o trabalho das empresas em plataformas e ambientes, desde o data center principal até a borda da rede.

Theme

© 2025 Red Hat