rust/src/test/run-pass/cleanup-copy-mode.rs

10 lines
195 B
Rust
Raw Normal View History

2012-02-24 19:46:13 -06:00
// xfail-win32
fn adder(+x: @int, +y: @int) -> int { ret *x + *y; }
fn failer() -> @int { fail; }
fn main() {
assert(result::failure(task::try {||
adder(@2, failer()); ()
}));
}