2012-06-19 19:28:29 -05:00
|
|
|
fn main() {
|
2012-08-15 20:46:55 -05:00
|
|
|
struct foo {
|
2012-09-06 21:40:15 -05:00
|
|
|
_x: comm::Port<()>,
|
2012-11-14 00:22:37 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
impl foo : Drop {
|
2012-11-28 17:42:16 -06:00
|
|
|
fn finalize(&self) {}
|
2012-06-22 15:11:29 -05:00
|
|
|
}
|
2012-09-05 17:58:43 -05:00
|
|
|
|
|
|
|
fn foo(x: comm::Port<()>) -> foo {
|
|
|
|
foo {
|
|
|
|
_x: x
|
|
|
|
}
|
|
|
|
}
|
2012-06-22 15:11:29 -05:00
|
|
|
|
2012-08-27 16:22:25 -05:00
|
|
|
let x = ~mut Some(foo(comm::Port()));
|
2012-06-19 19:28:29 -05:00
|
|
|
|
2012-07-02 16:44:31 -05:00
|
|
|
do task::spawn |move x| { //~ ERROR not a sendable value
|
2012-08-20 14:23:37 -05:00
|
|
|
let mut y = None;
|
2012-06-19 19:28:29 -05:00
|
|
|
*x <-> y;
|
|
|
|
log(error, y);
|
|
|
|
}
|
|
|
|
}
|