Introduction
1.
What are editions?
1.1.
Creating a new project
1.2.
Transitioning an existing project to a new edition
1.3.
Advanced migrations
2.
Rust 2015
3.
Rust 2018
3.1.
Path and module system changes
3.2.
Anonymous trait function parameters deprecated
3.3.
New keywords
3.4.
Method dispatch for raw pointers to inference variables
3.5.
Cargo changes
4.
Rust 2021
4.1.
Additions to the prelude
4.2.
Default Cargo feature resolver
4.3.
IntoIterator for arrays
4.4.
Disjoint capture in closures
4.5.
Panic macro consistency
4.6.
Reserved syntax
4.7.
Raw lifetimes
4.8.
Warnings promoted to errors
4.9.
Or patterns in macro-rules
4.10.
C-string literals
5.
Rust 2024
5.1.
Language
5.1.1.
RPIT lifetime capture rules
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
5.2.
Standard library
5.2.1.
Changes to the prelude
5.2.2.
Add IntoIterator for Box<[T]>
5.2.3.
Newly unsafe functions
5.3.
Cargo
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
5.4.
Rustdoc
5.4.1.
Rustdoc combined tests
5.4.2.
Rustdoc nested include! change
5.5.
Rustfmt
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
光
锈
煤
海军
香鱼
Rust 版本指南
简介
欢迎来到 Rust 版本指南! “版本” 是 Rust 引入语言变更的方式,这些变更通常不具有向后兼容性。
在本指南中,我们将讨论
什么是版本
每个版本包含哪些变更
如何将您的代码从一个版本迁移到另一个版本