https://doc.rust-lang.org/stable/edition-guide/

Introduction - The Rust Edition Guide

  1. Introduction
  2. 1. What are editions?
    1. 1.1. Creating a new project
    2. 1.2. Transitioning an existing project to a new edition
    3. 1.3. Advanced migrations
  3. 2. Rust 2015
  4. 3. Rust 2018
    1. 3.1. Path and module system changes
    2. 3.2. Anonymous trait function parameters deprecated
    3. 3.3. New keywords
    4. 3.4. Method dispatch for raw pointers to inference variables
    5. 3.5. Cargo changes
  5. 4. Rust 2021
    1. 4.1. Additions to the prelude
    2. 4.2. Default Cargo feature resolver
    3. 4.3. IntoIterator for arrays
    4. 4.4. Disjoint capture in closures
    5. 4.5. Panic macro consistency
    6. 4.6. Reserved syntax
    7. 4.7. Raw lifetimes
    8. 4.8. Warnings promoted to errors
    9. 4.9. Or patterns in macro-rules
    10. 4.10. C-string literals
  6. 5. Rust 2024
    1. 5.1. Language
        1. 5.1.1. RPIT lifetime capture rules
    2. 5.1.2. if let temporary scope
    3. 5.1.3. let chains in if and while
    4. 5.1.4. Tail expression temporary scope
    5. 5.1.5. Match ergonomics reservations
    6. 5.1.6. Unsafe extern blocks
    7. 5.1.7. Unsafe attributes
    8. 5.1.8. unsafe_op_in_unsafe_fn warning
    9. 5.1.9. Disallow references to static mut
    10. 5.1.10. Never type fallback change
    11. 5.1.11. Macro fragment specifiers
    12. 5.1.12. Missing macro fragment specifiers
    13. 5.1.13. gen keyword
    14. 5.1.14. Reserved syntax 3. 5.2. Standard library 4. 1. 5.2.1. Changes to the prelude
    15. 5.2.2. Add IntoIterator for Box<[T]>
    16. 5.2.3. Newly unsafe functions 5. 5.3. Cargo 6. 1. 5.3.1. Cargo: Rust-version aware resolver
    17. 5.3.2. Cargo: Table and key name consistency
    18. 5.3.3. Cargo: Reject unused inherited default-features 7. 5.4. Rustdoc 8. 1. 5.4.1. Rustdoc combined tests
    19. 5.4.2. Rustdoc nested include! change 9. 5.5. Rustfmt 10. 1. 5.5.1. Rustfmt: Style edition
    20. 5.5.2. Rustfmt: Formatting fixes
    21. 5.5.3. Rustfmt: Raw identifier sorting
    22. 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