diff --git a/src/test/run-pass/unwind-resource.rs b/src/test/run-pass/unwind-resource.rs index 52c09aadfbd..449e500edbe 100644 --- a/src/test/run-pass/unwind-resource.rs +++ b/src/test/run-pass/unwind-resource.rs @@ -37,7 +37,8 @@ fn f(tx: Sender) { pub fn main() { let (tx, rx) = channel(); - let _t = thread::spawn(move|| f(tx.clone())); + let t = thread::spawn(move|| f(tx.clone())); println!("hiiiiiiiii"); assert!(rx.recv().unwrap()); + drop(t.join()); } diff --git a/src/test/run-pass/unwind-unique.rs b/src/test/run-pass/unwind-unique.rs index d38b6e79eba..4d90f71c830 100644 --- a/src/test/run-pass/unwind-unique.rs +++ b/src/test/run-pass/unwind-unique.rs @@ -19,5 +19,6 @@ fn f() { } pub fn main() { - let _t = thread::spawn(f); + let t = thread::spawn(f); + drop(t.join()); }