Sign in

Radar · Rust · Archive · Week 10 · Mar 2 – 8, 2026

Announcing Rust 1.94.0

Worth knowingcompiler

What changed
The Rust team announced the 1.94.0 release.
Production impact
The source does not say.
Try it
Run rustc --version to verify you are on 1.94.0.
Source
blog.rust-lang.org/2026/03/05/Rust-1.94.0/

Understand it, then run it

Rust 1.94.0 adds a new method called array_windows for slices. It lets you slide a fixed‑size window over a slice, but each window is a real array (&[T; N]) instead of a slice (&[T]). Because the window size is known at compile time, the compiler can infer it from how you use the iterator. This makes it easier to write code that looks at a fixed number of elements at a time, like searching for patterns.

Run it now

Todayrust
// This program demonstrates the new `array_windows` method introduced in Rust 1.94.0.
// It searches a string for the ABBA pattern described in the release notes.

fn has_abba(s: &str) -> bool {
    // Convert the string to bytes and iterate over 4‑element windows.
    // The compiler infers the window size from the pattern `[a1, b1, b2, a2]`.
    s.as_bytes()
        .array_windows()
        .any(|[a1, b1, b2, a2]| (a1 != b1) && (a1 == a2) && (b1 == b2))
}

fn main() {
    let examples = ["xyyx", "abba", "abcd", "xyyxz"];
    for ex in &examples {
        println!("{} -> {}", ex, has_abba(ex));
    }
}

What it printed when we ran it on Rust 1.98.1 (edition 2024)

xyyx -> true
abba -> true
abcd -> false
xyyxz -> true

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