Radar · Rust · Archive · Week 8 · Feb 17 – 23, 2025
Rust 1.85.0 and Rust 2024
Worth knowingcompiler
- What changed
- The Rust team announced the release of Rust 1.85.0 and the 2024 edition of the language.
- Production impact
- The source does not say.
- Try it
- Run
rustc --versionto confirm you are on 1.85.0. - Source
- blog.rust-lang.org/2025/02/20/Rust-1.85.0/
Understand it, then run it
Rust 1.85.0 is a new stable release that brings the 2024 edition into the stable toolchain. The edition is a way to opt‑in to language changes that might otherwise break existing code. With the 2024 edition you get a few new syntax rules and a handful of library updates, but most of the changes are subtle. One of the most visible new features is support for asynchronous closures: you can now write async || { … } and call it like a normal function, getting a future back. This lets you write async logic that captures local variables without wrapping the body in an async { … } block.
Run it now
// This program demonstrates the new FromIterator and Extend implementations
// for tuples up to 12 elements, which were stabilized in Rust 1.85.0.
// It runs on Rust 1.98.1 (edition 2024) and prints the collected collections.
use std::collections::{LinkedList, VecDeque};
fn main() {
// Create a tuple of three collections and fill them by collecting
// from an iterator that yields 3‑tuples.
let (squares, cubes, tesseracts): (Vec<_>, VecDeque<_>, LinkedList<_>) =
(0i32..10).map(|i| (i * i, i.pow(3), i.pow(4))).collect();
// Print each collection to show the result.
println!("{squares:?}");
println!("{cubes:?}");
println!("{tesseracts:?}");
}
What it printed when we ran it on Rust 1.98.1 (edition 2024)
[0, 1, 4, 9, 16, 25, 36, 49, 64, 81] [0, 1, 8, 27, 64, 125, 216, 343, 512, 729] [0, 1, 16, 81, 256, 625, 1296, 2401, 4096, 6561]
Run sends this program (for Solidity, the contract and its tests) to our own sandbox, where it is compiled and run once, with no network, and what it printed or the test report comes back here. Nothing is kept. Runs are counted per visitor for the day so everyone gets a turn; the details are on the legal page.
Written by gpt-oss-20b from the linked source · claims checked against the sources · archive, not individually reviewed