rust/src/test/compile-fail/no-send-res-ports.rs

16 lines
307 B
Rust
Raw Normal View History

fn main() {
class foo {
let _x: comm::port<()>;
new(x: comm::port<()>) { self._x = x; }
drop {}
}
let x = ~mut some(foo(comm::port()));
2012-06-30 18:19:07 -05:00
do task::spawn |move x| { //! ERROR not a sendable value
let mut y = none;
*x <-> y;
log(error, y);
}
}