The offending example is:
use std::thread::Thread;
fn main() {
for _ in 0..10 {
Thread::spawn(|| {
println!("Hello World!");
});
}
}
With the new detaching thread semantics, this is incorrect since main can exit before all the detached threads have printed.