← Back to archive

Stdle #122 · ownership · 2026-10-06

What does this Rust snippet output?

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

fn main() {
let a = String::from("data");
let b = a.clone();
let c = a;
println!("{} {}", b, c);
}
Ownership
4 attempts left

Answer & explanation