← Back to archive

Stdle #100 · ownership · 2026-09-14

What does this Rust snippet output?

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

fn main() {
let s = String::from("rust");
let t = s;
println!("{}", t.len());
println!("{}", t);
}
Ownership
2 lines
4 attempts left

Answer & explanation