]> git.lizzy.rs Git - rust.git/blobdiff - src/test/run-pass/issue-2288.rs
cleanup: s/impl Copy/#[derive(Copy)]/g
[rust.git] / src / test / run-pass / issue-2288.rs
index 57d6fed041aafca0245ee647ec2aa17e4e31804f..18bb6fe55299d0a0c362b11ab04de38e554e24b6 100644 (file)
@@ -8,9 +8,14 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unknown_features)]
+#![feature(box_syntax)]
+
 trait clam<A> {
   fn chowder(&self, y: A);
 }
+
+#[derive(Copy)]
 struct foo<A> {
   x: A,
 }
@@ -26,13 +31,13 @@ fn foo<A>(b: A) -> foo<A> {
     }
 }
 
-fn f<A>(x: @clam<A>, a: A) {
+fn f<A>(x: Box<clam<A>>, a: A) {
   x.chowder(a);
 }
 
 pub fn main() {
 
   let c = foo(42);
-  let d: @clam<int> = @c as @clam<int>;
+  let d: Box<clam<int>> = box c as Box<clam<int>>;
   f(d, c.x);
 }