rust/src/test/run-pass/unwind-resource2.rs
2012-06-30 16:01:49 -07:00

21 lines
296 B
Rust

// xfail-win32
use std;
import task;
import comm;
class complainer {
let c: @int;
new(c: @int) { self.c = c; }
drop {}
}
fn f() {
let c <- complainer(@0);
fail;
}
fn main() {
let builder = task::builder();
task::unsupervise(builder);
task::run(builder, {|| f(); });
}