rust/src/test/run-pass/clone-with-exterior.rs

10 lines
177 B
Rust
Raw Normal View History

2010-06-23 23:03:09 -05:00
fn f(@rec(int a, int b) x) {
check (x.a == 10);
check (x.b == 12);
}
fn main() {
let @rec(int a, int b) z = rec(a=10, b=12);
let task p = spawn thread f(z);
join p;
}