Stdle #72 · ownership · 2026-08-17
What does this Rust snippet output?
A past puzzle — fully playable. 4 attempts, hints on wrong guesses.
#[derive(Copy, Clone)]struct P { x: i32, y: i32 }fn main() { let a = P { x: 3, y: 4 }; let b = a; println!("{}", a.x + b.y);}Ownership