Search

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

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.

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.

© 2024 Red Hat, Inc.