// 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,
}
}
}
-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);
}