Rust 1.56 Released: The Rust 2021 Edition
Rust 1.56 stabilised the Rust 2021 edition, bringing disjoint closure captures, by-value array iteration, and prelude additions.
Historical Archive. This article documents an event from 2021 and is preserved with its original date for reference. It is not current news, and details may have changed since publication.
What happened
Rust 1.56.0 was released on October 21, 2021, according to the official Rust blog, and stabilised the Rust 2021 edition. The team described it as a smaller edition than 2018, but one that still brought several quality-of-life changes requiring an opt-in to avoid breaking corner cases in existing code.
Disjoint closure captures
The most visible change is disjoint capture in closures. Before 2021, a closure that used a field of a struct captured the whole struct; from Rust 2021, closures capture only the individual fields they actually use. This simplifies common patterns, for example allowing one field to be moved out while another is still used inside a closure, and comes with an automatic migration for the rare cases where drop order matters.
Other edition changes
Rust 2021 also changed array.into_iter() to iterate by value rather than by reference, added TryInto, TryFrom and FromIterator to the prelude, made the version 2 Cargo feature resolver the default, and required panic macros to always treat their first argument as a format string. Rust 1.56 additionally introduced a rust-version field in Cargo.toml to declare a crate's minimum supported Rust version.
Why it mattered
The 2021 edition delivered focused ergonomic improvements, most notably disjoint closure captures, without the disruption of a large edition, while keeping automatic migration available. It kept Rust's edition system working as intended: evolving the language meaningfully while preserving compatibility for existing code.
Related on Skillo
See also: Rust 1.65 and generic associated types.
Sources
Published date reflects the original event date (2021-10-21). This article is original Skillo editorial written from the sources above; facts were verified in September 2026.
Written by
Skillo Staff
0 Comments
Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.