]> git.lizzy.rs Git - rust.git/blobdiff - src/test/run-pass/assignability-trait.rs
test: Automatically remove all `~[T]` from tests.
[rust.git] / src / test / run-pass / assignability-trait.rs
index 85c5ae444ebda9553424b812a161fb4530538045..aa3e28c875e402f8d8b54ffaba35e9f454d69c81 100644 (file)
@@ -22,7 +22,7 @@ fn iterate(&self, f: |x: &A| -> bool) -> bool {
     }
 }
 
-impl<A> iterable<A> for ~[A] {
+impl<A> iterable<A> for Vec<A> {
     fn iterate(&self, f: |x: &A| -> bool) -> bool {
         self.iter().advance(f)
     }
@@ -38,7 +38,7 @@ fn length<A, T: iterable<A>>(x: T) -> uint {
 }
 
 pub fn main() {
-    let x = ~[0,1,2,3];
+    let x = vec!(0,1,2,3);
     // Call a method
     x.iterate(|y| { assert!(x[*y] == *y); true });
     // Call a parameterized function