// 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);
}