]> git.lizzy.rs Git - rust.git/blobdiff - src/test/run-pass/match-join.rs
cleanup: s/impl Copy/#[derive(Copy)]/g
[rust.git] / src / test / run-pass / match-join.rs
index 66b64768060943399f995ee88de850463474a35b..a9039885296b0020200ff23ade39b4753ebbd31d 100644 (file)
@@ -8,12 +8,9 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-
-extern mod extra;
-
 fn foo<T>(y: Option<T>) {
     let mut x: int;
-    let mut rs: ~[int] = ~[];
+    let mut rs: Vec<int> = Vec::new();
     /* tests that x doesn't get put in the precondition for the
        entire if expression */
 
@@ -23,9 +20,9 @@ fn foo<T>(y: Option<T>) {
           None::<T> => x = 17,
           _ => x = 42
         }
-        rs += ~[x];
+        rs.push(x);
     }
     return;
 }
 
-pub fn main() { debug!("hello"); foo::<int>(Some::<int>(5)); }
+pub fn main() { println!("hello"); foo::<int>(Some::<int>(5)); }