← Back to archive

Stdle #96 · comparisons · 2026-09-10

What does this Rust snippet output?

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

fn main() {
let nums = [2, 4, 6];
let s = match nums {
[a, b, c] => a + b + c,
};
println!("{}", s);
}
Comparisons
4 attempts left

Answer & explanation