The Rust Edition Guide
Introduction
What are editions?
Creating a new project
Transitioning an existing project to a new edition
Advanced migrations
Rust 2015
Rust 2018
Path and module system changes
Anonymous trait function parameters deprecated
New keywords
Method dispatch for raw pointers to inference variables
Cargo changes
Rust 2021
Additions to the prelude
Default Cargo feature resolver
IntoIterator for arrays
Disjoint capture in closures
Panic macro consistency
Reserved syntax
Raw lifetimes
Warnings promoted to errors
Or patterns in macro-rules
C-string literals
Rust 2024
Language
RPIT lifetime capture rules
`if let` temporary scope
`let` chains in `if` and `while`
Tail expression temporary scope
Match ergonomics reservations
Unsafe `extern` blocks
Unsafe attributes
`unsafe_op_in_unsafe_fn` warning
Disallow references to `static mut`
Never type fallback change
Macro fragment specifiers
Missing macro fragment specifiers
`gen` keyword
Reserved syntax
Standard library
Changes to the prelude
Add `IntoIterator` for `Box<[T]>`
Newly unsafe functions
Cargo
Cargo: Rust-version aware resolver
Cargo: Table and key name consistency
Cargo: Reject unused inherited default-features
Rustdoc
Rustdoc combined tests
Rustdoc nested `include!` change
Rustfmt
Rustfmt: Style edition
Rustfmt: Formatting fixes
Rustfmt: Raw identifier sorting
Rustfmt: Version sorting
Rust 2024
Info
RFC
#3501
Release version
1.85.0
Previous
Next