Rust 1.80 Released: Overview of Key Changes and Innovations

Online Python Trainer for Beginners

Learn Python easily without overwhelming theory. Solve practical tasks with automatic checking, get hints in Russian, and write code directly in your browser — no installation required.

Start Course

Rust 1.80 is out: overview of key changes and innovations



The Rust development team has released another stable release — version 1.80.0. This update brings several long-awaited features, stabilizes a number of APIs, and improves the user experience. Let's take a look at what has changed and how these innovations will affect development.



Stabilization of LazyCell and LazyLock

Perhaps the most notable innovation is the stabilization of the LazyCell and LazyLock types. Previously, lazy initialization of data required using third-party crates (e.g., once_cell) or complex constructs.

  • LazyCell — non-blocking lazy initialization for a single-threaded context. Allows deferring the creation of a value until the first access.
  • LazyLock — a thread-safe version that uses a mutex for access synchronization. Ideal for global configurations and singletons.

Both types implement the Deref and DerefMut traits, making them convenient to use. Now the standard library covers the most common lazy initialization scenarios.



API stabilization: Exclusive and others

Version 1.80 stabilizes a number of new APIs:

  • Exclusive — a wrapper for exclusive access to a value. Allows safe work with non-Send types in an asynchronous context by providing synchronous access via a closure.
  • Methods BorrowedBuf::as_slice and BorrowedCursor::as_slice — simplify working with I/O buffers.
  • HashMap::extract_if and HashSet::extract_if — iterators that allow removing elements from a collection based on a predicate, taking ownership of them.


Compiler improvements

The Rust team continues to work on compiler feedback. In 1.80, error messages for incorrect use of traits and lifetimes have been improved. The compiler now offers more precise hints, which is especially useful for beginners.

  • Improved diagnostics for errors related to types implementing Drop.
  • More understandable messages for import conflicts.
  • Compilation time optimization for projects using macros.


What does this mean for developers?

Updating to Rust 1.80 is recommended for everyone who actively uses lazy initialization or works with asynchronous code. The stabilization of LazyLock allows you to abandon external dependencies, simplifying the build and increasing security. New methods for collections make code more idiomatic, and improved compiler diagnostics speed up debugging.



For PythonLib users who are learning Rust or using it in conjunction with Python (e.g., via PyO3), this update is also important: stable APIs and improved compiler performance make Rust even more attractive for systems programming and high-load services.



The full list of changes is available in the official release notes. You can update Rust with the command rustup update stable.

Recommended Libraries