What Changed in Rust Edition 2024?

Rust Edition 2024 is the latest stable version that updates your project's language rules and defaults by setting edition = "2024" in Cargo.toml.

Rust Edition 2024 is the latest stable edition that bundles recent language features, updated standard library defaults, and improved tooling into a single, consistent baseline for new projects. To use it, set the edition in your project's Cargo.toml file:

[package]
edition = "2024"

If you are updating the Rust Book repository specifically, run ./tools/update-editions.sh to update all listing Cargo.toml files, then manually set edition = "2024" in the [rust] table of both book.toml and nostarch/book.toml.