Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardRustStatic bound semanticsSingle-choice MCQ

Why does this function fail to compile, and what does it reveal about `'static` bounds on spawned closures?

use std::thread; fn run(data: &Vec<i32>) { thread::spawn(move || { println!("{}", data.len()); }); }