// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#![feature(managed_boxes)]
+#![feature(unsafe_destructor)]
extern crate debug;
use std::cell::Cell;
+use std::gc::{Gc, GC};
struct r {
- i: @Cell<int>,
+ i: Gc<Cell<int>>,
}
#[unsafe_destructor]
}
}
-fn r(i: @Cell<int>) -> r {
+fn r(i: Gc<Cell<int>>) -> r {
r {
i: i
}
}
fn main() {
- let i = @Cell::new(0);
+ let i = box(GC) Cell::new(0);
{
// Can't do this copy
let x = box box box A {y: r(i)};
- let _z = x.clone(); //~ ERROR failed to find an implementation
+ let _z = x.clone(); //~ ERROR not implemented
println!("{:?}", x);
}
println!("{:?}", *i);