-// xfail-test #5321
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
+
trait double {
fn double(self) -> uint;
}
fn double(self) -> uint { self }
}
-impl double for @uint {
+impl double for Box<uint> {
fn double(self) -> uint { *self * 2u }
}
pub fn main() {
- let x = @3u;
+ let x = box 3u;
assert_eq!(x.double(), 6u);
}