← Back to archive

Stdle #41 · ownership · 2026-07-17

What does this Rust snippet output?

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

fn main() {
let p = (1, 2);
let q = p;
println!("{} {}", p.0 + q.0, p.1 + q.1);
}
Ownership
4 attempts left

Answer & explanation