]> git.lizzy.rs Git - rust.git/blobdiff - src/test/run-fail/vec-overrun.rs
test: Make manual changes to deal with the fallout from removal of
[rust.git] / src / test / run-fail / vec-overrun.rs
index 1542984c1d363e230d29a25147e033eeecac8d8b..169c00182dd396857acd6d2df092f4f4c5cff848 100644 (file)
@@ -8,13 +8,15 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-
 // error-pattern:index out of bounds: the len is 1 but the index is 2
+
+use std::vec_ng::Vec;
+
 fn main() {
     let v: Vec<int> = vec!(10);
-    let x: int = 0;
-    assert_eq!(v[x], 10);
+    let x: uint = 0;
+    assert_eq!(*v.get(x), 10);
     // Bounds-check failure.
 
-    assert_eq!(v[x + 2], 20);
+    assert_eq!(*v.get(x + 2), 20);
 }