]> git.lizzy.rs Git - rust.git/blobdiff - src/test/run-pass/move-4-unique.rs
cleanup: s/impl Copy/#[derive(Copy)]/g
[rust.git] / src / test / run-pass / move-4-unique.rs
index 660fb447bb0e5401890ec727c927b65d179efba7..9e5eeef75527c1595ba1a601c4988a5d4e852ac0 100644 (file)
@@ -8,11 +8,12 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-extern crate extra;
+#![allow(unknown_features)]
+#![feature(box_syntax)]
 
 struct Triple {a: int, b: int, c: int}
 
-fn test(foo: ~Triple) -> ~Triple {
+fn test(foo: Box<Triple>) -> Box<Triple> {
     let foo = foo;
     let bar = foo;
     let baz = bar;
@@ -20,4 +21,8 @@ fn test(foo: ~Triple) -> ~Triple {
     return quux;
 }
 
-pub fn main() { let x = ~Triple{a: 1, b: 2, c: 3}; let y = test(x); assert!((y.c == 3)); }
+pub fn main() {
+    let x = box Triple{a: 1, b: 2, c: 3};
+    let y = test(x);
+    assert!((y.c == 3));
+}