]> git.lizzy.rs Git - rust.git/blobdiff - src/test/run-pass/objects-owned-object-borrowed-method-header.rs
test: Make manual changes to deal with the fallout from removal of
[rust.git] / src / test / run-pass / objects-owned-object-borrowed-method-header.rs
index 7a0c7b34d2f3705e2371a3acd822d82f4a33022e..ec284b24dbd1a9b70dea0b19cb569f35f96d953b 100644 (file)
@@ -12,6 +12,8 @@
 
 #[feature(managed_boxes)];
 
+use std::vec_ng::Vec;
+
 // Test invoked `&self` methods on owned objects where the values
 // closed over contain managed values. This implies that the ~ boxes
 // will have headers that must be skipped over.
@@ -31,13 +33,13 @@ fn foo(&self) -> uint {
 }
 
 pub fn main() {
-    let foos: vec!( ~FooTrait: ) = vec!(
+    let foos: Vec<~FooTrait:> = vec!(
         ~BarStruct{ x: @0 } as ~FooTrait:,
         ~BarStruct{ x: @1 } as ~FooTrait:,
         ~BarStruct{ x: @2 } as ~FooTrait:
     );
 
     for i in range(0u, foos.len()) {
-        assert_eq!(i, foos[i].foo());
+        assert_eq!(i, foos.get(i).foo());
     }
 }