]> git.lizzy.rs Git - rust.git/blobdiff - src/test/compile-fail/pinned-deep-copy.rs
rollup merge of #17355 : gamazeps/issue17210
[rust.git] / src / test / compile-fail / pinned-deep-copy.rs
index e118549f2c2e7fa54ec56c0f7671ce8678037b32..0e8bb40e0ffee01357bae2610b948078587603a1 100644 (file)
@@ -8,14 +8,15 @@
 // 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]
@@ -27,7 +28,7 @@ fn drop(&mut self) {
     }
 }
 
-fn r(i: @Cell<int>) -> r {
+fn r(i: Gc<Cell<int>>) -> r {
     r {
         i: i
     }
@@ -38,11 +39,11 @@ struct A {
 }
 
 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);