]> git.proxmox.com Git - rustc.git/blobdiff - src/test/run-pass/autoderef-method-priority.rs
Imported Upstream version 1.0.0~0alpha
[rustc.git] / src / test / run-pass / autoderef-method-priority.rs
index 0fe30059ef65a36891e19e66fd84efb2ef7ae67e..f5d5c81117e11a106f6aea36d88616ff40dcbb43 100644 (file)
@@ -1,4 +1,3 @@
-// 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.
@@ -9,6 +8,9 @@
 // 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;
 }
@@ -17,11 +19,11 @@ impl double for 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);
 }