← Back to archive

Stdle #140 · iteration · 2026-10-24

What does this Rust snippet output?

A past puzzle — fully playable. 4 attempts, hints on wrong guesses.

fn main() {
let v: Vec<i32> =
(1..=2).take(5).collect();
println!("{:?} len {}", v, v.len());
}
Iteration
4 attempts left

Answer & explanation