Rust 1.85.0 is announced with the 2024 edition stabilized. It's a programming language for reliable and efficient software.
- To get 1.85.0 with
rustup
, userustup update stable
. Or getrustup
from the website and check release notes. - For testing future releases, update to beta or nightly channels and report bugs.
- To get 1.85.0 with
In 1.85.0 stable:
Rust 2024 Edition:
- Language changes like RPIT lifetime capture rules,
if let
temporary scope, etc. - Standard library changes like adding
Future
to prelude and changing iterator behavior. - Cargo changes like the resolver and table key names.
- Rustdoc changes like combined tests and nested
include!
. - Rustfmt changes like style editions and various formatting fixes.
- Migration instructions are in the guide.
cargo fix
can automate some changes.
- Language changes like RPIT lifetime capture rules,
async
closures: Support forasync || {}
returning futures and analogous traits. Examples show differences from regular closures.- Hiding trait implementations from diagnostics: Use
#[diagnostic::do_not_recommend]
attribute. FromIterator
andExtend
for tuples: Extended to more tuple lengths.- Updates to
std::env::home_dir()
: Deprecated function's behavior updated as a bug fix; subsequent release will remove deprecation. - Stabilized APIs: Many APIs are now stable in const contexts.
- Other changes: Check the release notes for changes in Rust, Cargo, and Clippy.
- Contributors: Many people contributed to Rust 1.85.0. Thanks!
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。