← Back to archive

Stdle #15 · scope · 2026-06-21

What does this Rust snippet output?

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

fn main() {
let word = "rust";
let word = word.to_uppercase();
let word = word.len();
println!("{}", word);
}
Scope
4 attempts left

Answer & explanation