]> git.lizzy.rs Git - rust.git/blobdiff - src/test/auxiliary/cci_nested_lib.rs
test: Automatically remove all `~[T]` from tests.
[rust.git] / src / test / auxiliary / cci_nested_lib.rs
index 90b01f8888bef4186b5ade011bdc4ca2c2baaa65..a9be1e62195ff9665904b52f60f03b769e77220b 100644 (file)
@@ -19,7 +19,7 @@ pub struct Entry<A,B> {
 
 pub struct alist<A,B> {
     eq_fn: extern "Rust" fn(A,A) -> bool,
-    data: @RefCell<~[Entry<A,B>]>,
+    data: @RefCell<Vec<Entry<A,B>> >,
 }
 
 pub fn alist_add<A:'static,B:'static>(lst: &alist<A,B>, k: A, v: B) {
@@ -47,7 +47,7 @@ pub fn new_int_alist<B:'static>() -> alist<int, B> {
     fn eq_int(a: int, b: int) -> bool { a == b }
     return alist {
         eq_fn: eq_int,
-        data: @RefCell::new(~[]),
+        data: @RefCell::new(Vec::new()),
     };
 }
 
@@ -57,6 +57,6 @@ pub fn new_int_alist_2<B:'static>() -> alist<int, B> {
     fn eq_int(a: int, b: int) -> bool { a == b }
     return alist {
         eq_fn: eq_int,
-        data: @RefCell::new(~[]),
+        data: @RefCell::new(Vec::new()),
     };
 }