Skip to content
Quiz · Threads · lesson 2 of 7

Quiz — spawn without move

What happens when this program is built and run?

Rust
use std::thread;

fn main() {
    let v = vec![1, 2, 3];
    let h = thread::spawn(|| println!("{v:?}"));
    h.join().unwrap();
}