Introduction - The Rust Edition Guide
- Introduction
- 1. What are editions?
- 2. Rust 2015
- 3. Rust 2018
- 4. Rust 2021
- 5. Rust 2024
- 5.1. Language
- 5.1.2. if let temporary scope
- 5.1.3. Tail expression temporary scope
- 5.1.4. Match ergonomics reservations
- 5.1.5. Unsafe extern blocks
- 5.1.6. Unsafe attributes
- 5.1.7. unsafe_op_in_unsafe_fn warning
- 5.1.8. Disallow references to static mut
- 5.1.9. Never type fallback change
- 5.1.10. Macro fragment specifiers
- 5.1.11. Missing macro fragment specifiers
- 5.1.12. gen keyword
- 5.1.13. Reserved syntax 3. 5.2. Standard library 4. 1. 5.2.1. Changes to the prelude
- 5.2.2. Add IntoIterator for Box<[T]>
- 5.2.3. Newly unsafe functions 5. 5.3. Cargo 6. 1. 5.3.1. Cargo: Rust-version aware resolver
- 5.3.2. Cargo: Table and key name consistency
- 5.3.3. Cargo: Reject unused inherited default-features 7. 5.4. Rustdoc 8. 1. 5.4.1. Rustdoc combined tests
- 5.4.2. Rustdoc nested include! change 9. 5.5. Rustfmt 10. 1. 5.5.1. Rustfmt: Style edition
- 5.5.2. Rustfmt: Formatting fixes
- 5.5.3. Rustfmt: Raw identifier sorting
- 5.5.4. Rustfmt: Version sorting
The Rust Edition Guide
Introduction
Welcome to The Rust Edition Guide! "Editions" are Rust's way of introducing changes into the language that would not otherwise be backwards compatible.
In this guide, we'll discuss:
- What editions are
- Which changes are contained in each edition
- How to migrate your code from one edition to another