]> git.lizzy.rs Git - rust.git/blobdiff - src/test/run-pass/vec-concat.rs
test: Make manual changes to deal with the fallout from removal of
[rust.git] / src / test / run-pass / vec-concat.rs
index 9b42a25956ee90482e66a38623267f1ffd71424e..0a9a65ac0e7550a21edca89dd2afe8355764e2c2 100644 (file)
@@ -8,12 +8,14 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::vec;
+
 pub fn main() {
-    let a: ~[int] = ~[1, 2, 3, 4, 5];
-    let b: ~[int] = ~[6, 7, 8, 9, 0];
-    let v: ~[int] = a + b;
+    let a: Vec<int> = vec!(1, 2, 3, 4, 5);
+    let b: Vec<int> = vec!(6, 7, 8, 9, 0);
+    let v: Vec<int> = vec::append(a, b.as_slice());
     println!("{}", v[9]);
-    assert_eq!(v[0], 1);
-    assert_eq!(v[7], 8);
-    assert_eq!(v[9], 0);
+    assert_eq!(*v.get(0), 1);
+    assert_eq!(*v.get(7), 8);
+    assert_eq!(*v.get(9), 0);
 }