// option. This file may not be copied, modified, or distributed
// except according to those terms.
-use std::task;
+use std::thread::Thread;
static mut dropped: bool = false;
}
pub fn main() {
- let ret = task::try(move|| {
+ let ret = Thread::scoped(move|| {
let _a = A { b: B { foo: 3 } };
- });
+ }).join();
assert!(ret.is_err());
unsafe { assert!(dropped); }
}
-