]> git.lizzy.rs Git - rust.git/blobdiff - src/test/run-pass/objects-owned-object-borrowed-method-headerless.rs
test: Make manual changes to deal with the fallout from removal of
[rust.git] / src / test / run-pass / objects-owned-object-borrowed-method-headerless.rs
index f9f59f88bf1fdf53d36f1f26e7d6cc9cc146537b..13258bed80f6c1761fe79cef92e1d1f6e57cf60a 100644 (file)
@@ -12,6 +12,8 @@
 // closed over do not contain managed values, and thus the ~ boxes do
 // not have headers.
 
+use std::vec_ng::Vec;
+
 trait FooTrait {
     fn foo(&self) -> uint;
 }
@@ -27,13 +29,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());
     }
 }