Stdle #111 · ownership · 2026-09-25
What does this Rust snippet output?
A past puzzle — fully playable. 4 attempts, hints on wrong guesses.
fn take(v: Vec<i32>) -> i32 { v.iter().sum()}fn main() { let v = vec![1, 2, 3, 4]; let s = take(v); println!("{}", s);}Ownership