3 #![allow(unused_must_use)]
10 // Here, i is *copied* into the proc (heap closure).
11 // Requires allocation. The proc's copy is not mutable.
13 let t = thread::spawn(move|| {
15 println!("spawned {}", i)
18 println!("original {}", i);
23 // Here, the original i has not been moved, only copied, so is still
24 // mutable outside of the proc.
27 let t = thread::spawn(move|| {
36 // Here, i must be shadowed in the proc to be mutable.
39 let t = thread::spawn(move|| {