← Back to archive

Stdle #82 · ownership · 2026-08-27

What does this Rust snippet output?

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

fn pass(s: String) -> String { s }
fn main() {
let a = String::from("z");
let b = pass(a);
let c = pass(b);
println!("{}", c);
}
Ownership
4 attempts left

Answer & explanation