Rechercher

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

Chapter 5. Changes in Rust 1.66.1 Toolset

download PDF

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

Notable changes include:

  • The thread::scope API creates a lexical scope in which local variables can be safely borrowed by newly spawned threads, and those threads are all guaranteed to exit before the scope ends.
  • The hint::black_box API adds a barrier to compiler optimization, which is useful for preserving behavior in benchmarks that might otherwise be optimized away.
  • The .await keyword now makes conversions with the IntoFuture trait, similar to the relationship between for and IntoIterator.
  • Generic associated types (GATs) allow traits to include type aliases with generic parameters, enabling new abstractions over both types and lifetimes.
  • A new let-else statement allows binding local variables with conditional pattern matching, executing a divergent else block when the pattern does not match.
  • Labeled blocks allow break statements to jump to the end of the block, optionally including an expression value.
  • rust-analyzer is a new implementation of the Language Server Protocol, enabling Rust support in many editors. This replaces the former rls package, but you might need to adjust your editor configuration to migrate to rust-analyzer .
  • Cargo has a new cargo remove subcommand for removing dependencies from Cargo.toml.

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

Red Hat logoGithubRedditYoutubeTwitter

Apprendre

Essayez, achetez et vendez

Communautés

À propos de la documentation Red Hat

Nous aidons les utilisateurs de Red Hat à innover et à atteindre leurs objectifs grâce à nos produits et services avec un contenu auquel ils peuvent faire confiance.

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 leBlog Red Hat.

À 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.

© 2024 Red Hat, Inc.