]> git.lizzy.rs Git - rust.git/commitdiff
RIMOV, round 10
authorBen Striegel <ben.striegel@gmail.com>
Wed, 30 Jan 2013 03:19:41 +0000 (22:19 -0500)
committerBen Striegel <ben.striegel@gmail.com>
Thu, 31 Jan 2013 04:19:08 +0000 (23:19 -0500)
find ./ -type f -name "*.rs" -exec sed -i "s/~\[mut /~\[/g" {} \;

28 files changed:
src/libcore/dvec.rs
src/libcore/vec.rs
src/libfuzzer/cycles.rs
src/libfuzzer/rand_util.rs
src/libstd/bitv.rs
src/libstd/map.rs
src/libstd/sha1.rs
src/libstd/sort.rs
src/libstd/sync.rs
src/libsyntax/print/pp.rs
src/test/bench/sudoku.rs
src/test/compile-fail/borrowck-mut-vec-as-imm-slice-bad.rs
src/test/compile-fail/issue-2548.rs
src/test/compile-fail/mutable-huh-variance-box.rs
src/test/compile-fail/mutable-huh-variance-deep.rs
src/test/compile-fail/mutable-huh-variance-ptr.rs
src/test/compile-fail/mutable-huh-variance-rec.rs
src/test/compile-fail/mutable-huh-variance-unique.rs
src/test/compile-fail/mutable-huh-variance-vec1.rs
src/test/compile-fail/mutable-huh-variance-vec2.rs
src/test/compile-fail/mutable-huh-variance-vec3.rs
src/test/compile-fail/mutable-huh-variance-vec4.rs
src/test/compile-fail/non-const.rs
src/test/compile-fail/vec-add.rs
src/test/run-pass/borrowck-mut-vec-as-imm-slice.rs
src/test/run-pass/issue-3563-3.rs
src/test/run-pass/log-linearized.rs
src/test/run-pass/mutable-vec-drop.rs

index 210ecfd70aaef71d81fb871d7978054a2b291666..e755b445134cb4423ac9dae252d254adeef15812 100644 (file)
@@ -46,7 +46,7 @@
  * # WARNING
  *
  * For maximum performance, this type is implemented using some rather
- * unsafe code.  In particular, this innocent looking `~[mut A]` pointer
+ * unsafe code.  In particular, this innocent looking `~[A]` pointer
  * *may be null!*  Therefore, it is important you not reach into the
  * data structure manually but instead use the provided extensions.
  *
@@ -143,7 +143,7 @@ fn swap(f: &fn(v: ~[A]) -> ~[A]) {
      * and return a new vector to replace it with.
      */
     #[inline(always)]
-    fn swap_mut(f: &fn(v: ~[mut A]) -> ~[mut A]) {
+    fn swap_mut(f: &fn(v: ~[A]) -> ~[A]) {
         do self.swap |v| {
             vec::cast_from_mut(f(vec::cast_to_mut(move v)))
         }
index 5361e4a58345cedb0786dc1d96009ba53c1f320c..30b3927d6f3dbf803a10ccb28c7abd796c11177a 100644 (file)
@@ -206,12 +206,12 @@ pub fn reserve_at_least<T>(v: &mut ~[T], n: uint) {
 }
 
 /// Produces a mut vector from an immutable vector.
-pub pure fn cast_to_mut<T>(v: ~[T]) -> ~[mut T] {
+pub pure fn cast_to_mut<T>(v: ~[T]) -> ~[T] {
     unsafe { ::cast::transmute(v) }
 }
 
 /// Produces an immutable vector from a mut vector.
-pub pure fn cast_from_mut<T>(v: ~[mut T]) -> ~[T] {
+pub pure fn cast_from_mut<T>(v: ~[T]) -> ~[T] {
     unsafe { ::cast::transmute(v) }
 }
 
@@ -562,7 +562,7 @@ pub fn consume<T>(v: ~[T], f: fn(uint, v: T)) {
     }
 }
 
-pub fn consume_mut<T>(v: ~[mut T], f: fn(uint, v: T)) {
+pub fn consume_mut<T>(v: ~[T], f: fn(uint, v: T)) {
     consume(vec::cast_from_mut(v), f)
 }
 
@@ -731,7 +731,7 @@ pub fn dedup<T: Eq>(v: &mut ~[T]) {
 }
 
 #[inline(always)]
-pub pure fn append_mut<T: Copy>(lhs: ~[mut T], rhs: &[const T]) -> ~[mut T] {
+pub pure fn append_mut<T: Copy>(lhs: ~[T], rhs: &[const T]) -> ~[T] {
     cast_to_mut(append(cast_from_mut(lhs), rhs))
 }
 
@@ -1640,9 +1640,9 @@ impl<T: Copy> ~[T] : Add<&[const T],~[T]> {
         }
     }
 
-    impl<T: Copy> ~[mut T] : Add<&[const T],~[mut T]> {
+    impl<T: Copy> ~[T] : Add<&[const T],~[T]> {
         #[inline(always)]
-        pure fn add(&self, rhs: & &self/[const T]) -> ~[mut T] {
+        pure fn add(&self, rhs: & &self/[const T]) -> ~[T] {
             append_mut(copy *self, (*rhs))
         }
     }
index 62401b4b434f4ad47c8bb4010c6c7f62bffecbf5..ee1bfc294294ab6e6343743e129b57dd966f4992 100644 (file)
@@ -43,7 +43,7 @@ enum maybe_pointy {
     mut g : fn~()->(),
 
     mut m : ~[maybe_pointy],
-    mut n : ~[mut maybe_pointy],
+    mut n : ~[maybe_pointy],
     mut o : {x : int, y : maybe_pointy}
 };
 // To add: objects; traits; anything type-parameterized?
index b351c559eac0bea2587805ed516a77931122518c..2b9e415ac2c1505d402bdf3ec5dff72e3bca3108 100644 (file)
@@ -25,7 +25,7 @@ fn choice<T: copy>(r : rand::rng, v : ~[T]) -> T {
 fn unlikely(r : rand::rng, n : uint) -> bool { under(r, n) == 0u }
 
 // shuffle a vec in place
-fn shuffle<T>(r : rand::rng, &v : ~[mut T]) {
+fn shuffle<T>(r : rand::rng, &v : ~[T]) {
     let i = vec::len(v);
     while i >= 2u {
         // Loop invariant: elements with index >= i have been locked in place.
index 10c6ac64f653002970a78ef3b9f8a3ba6ba47239..834b5add6eb76d07b60a6b93b7ef163fccfab0a7 100644 (file)
@@ -109,7 +109,7 @@ struct BigBitv {
     mut storage: ~[uint]
 }
 
-fn BigBitv(storage: ~[mut uint]) -> BigBitv {
+fn BigBitv(storage: ~[uint]) -> BigBitv {
     BigBitv {storage: move storage}
 }
 
index 7545a6e0bef3daf9187100eae97e99fa16e79e1f..62bce2c2894149a8804434649f75dbe6a3d8acec 100644 (file)
@@ -458,7 +458,7 @@ impl<K:Eq IterBytes Hash Copy, V: Copy> T<K, V>: ops::Index<K, V> {
         }
     }
 
-    fn chains<K,V>(nchains: uint) -> ~[mut Option<@Entry<K,V>>] {
+    fn chains<K,V>(nchains: uint) -> ~[Option<@Entry<K,V>>] {
         vec::cast_to_mut(vec::from_elem(nchains, None))
     }
 
index 4a7e67f22b99ae20031135235df124a385360d48..20359782d962da93fe62837d9f416c4213f85bd7 100644 (file)
@@ -67,13 +67,13 @@ trait Sha1 {
 /// Construct a `sha` object
 pub fn sha1() -> Sha1 {
     type Sha1State =
-        {h: ~[mut u32],
+        {h: ~[u32],
          mut len_low: u32,
          mut len_high: u32,
          mut msg_block: ~[u8],
          mut msg_block_idx: uint,
          mut computed: bool,
-         work_buf: @~[mut u32]};
+         work_buf: @~[u32]};
 
     fn add_input(st: &Sha1State, msg: &[const u8]) {
         assert (!st.computed);
index c8e6fedbc5d02a3471c2dbe6cac3da8a3ff97262..5e39b8b6801acaacb9278d08fd574e93a5c20f2d 100644 (file)
@@ -1019,7 +1019,7 @@ fn test_managed() {
         tabulate_managed(low, high);
     }
 
-    fn multiplyVec<T: Copy>(arr: &[const T], num: uint) -> ~[mut T] {
+    fn multiplyVec<T: Copy>(arr: &[const T], num: uint) -> ~[T] {
         let size = arr.len();
         let res = do vec::from_fn(num) |i| {
             arr[i % size]
index bd9386845aea9b1866d217b9ddd430612ba18e20..dabc5b383a4c226d6fe7010b41a5ad3e14f296c8 100644 (file)
@@ -92,7 +92,7 @@ fn new_sem<Q: Owned>(count: int, q: Q) -> Sem<Q> {
 }
 #[doc(hidden)]
 fn new_sem_and_signal(count: int, num_condvars: uint)
-        -> Sem<~[mut Waitqueue]> {
+        -> Sem<~[Waitqueue]> {
     let mut queues = ~[];
     for num_condvars.times {
         queues.push(new_waitqueue());
@@ -150,7 +150,7 @@ fn access<U>(blk: fn() -> U) -> U {
     }
 }
 #[doc(hidden)]
-impl &Sem<~[mut Waitqueue]> {
+impl &Sem<~[Waitqueue]> {
     fn access<U>(blk: fn() -> U) -> U {
         let mut release = None;
         unsafe {
@@ -166,7 +166,7 @@ fn access<U>(blk: fn() -> U) -> U {
 // FIXME(#3588) should go inside of access()
 #[doc(hidden)]
 type SemRelease = SemReleaseGeneric<()>;
-type SemAndSignalRelease = SemReleaseGeneric<~[mut Waitqueue]>;
+type SemAndSignalRelease = SemReleaseGeneric<~[Waitqueue]>;
 struct SemReleaseGeneric<Q> { sem: &Sem<Q> }
 
 impl<Q: Owned> SemReleaseGeneric<Q> : Drop {
@@ -181,7 +181,7 @@ fn SemRelease(sem: &r/Sem<()>) -> SemRelease/&r {
     }
 }
 
-fn SemAndSignalRelease(sem: &r/Sem<~[mut Waitqueue]>)
+fn SemAndSignalRelease(sem: &r/Sem<~[Waitqueue]>)
     -> SemAndSignalRelease/&r {
     SemReleaseGeneric {
         sem: sem
@@ -189,7 +189,7 @@ fn SemAndSignalRelease(sem: &r/Sem<~[mut Waitqueue]>)
 }
 
 /// A mechanism for atomic-unlock-and-deschedule blocking and signalling.
-pub struct Condvar { priv sem: &Sem<~[mut Waitqueue]> }
+pub struct Condvar { priv sem: &Sem<~[Waitqueue]> }
 
 impl Condvar : Drop { fn finalize(&self) {} }
 
@@ -259,7 +259,7 @@ fn wait_on(condvar_id: uint) {
         // mutex during unwinding. As long as the wrapper (mutex, etc) is
         // bounded in when it gets released, this shouldn't hang forever.
         struct SemAndSignalReacquire {
-            sem: &Sem<~[mut Waitqueue]>,
+            sem: &Sem<~[Waitqueue]>,
         }
 
         impl SemAndSignalReacquire : Drop {
@@ -273,7 +273,7 @@ fn finalize(&self) {
             }
         }
 
-        fn SemAndSignalReacquire(sem: &r/Sem<~[mut Waitqueue]>)
+        fn SemAndSignalReacquire(sem: &r/Sem<~[Waitqueue]>)
             -> SemAndSignalReacquire/&r {
             SemAndSignalReacquire {
                 sem: sem
@@ -345,7 +345,7 @@ fn check_cvar_bounds<U>(out_of_bounds: Option<uint>, id: uint, act: &str,
 }
 
 #[doc(hidden)]
-impl &Sem<~[mut Waitqueue]> {
+impl &Sem<~[Waitqueue]> {
     // The only other place that condvars get built is rwlock_write_mode.
     fn access_cond<U>(blk: fn(c: &Condvar) -> U) -> U {
         do self.access { blk(&Condvar { sem: self }) }
@@ -400,7 +400,7 @@ fn access<U>(blk: fn() -> U) -> U { (&self.sem).access(blk) }
  * A task which fails while holding a mutex will unlock the mutex as it
  * unwinds.
  */
-struct Mutex { priv sem: Sem<~[mut Waitqueue]> }
+struct Mutex { priv sem: Sem<~[Waitqueue]> }
 
 /// Create a new mutex, with one associated condvar.
 pub fn Mutex() -> Mutex { mutex_with_condvars(1) }
@@ -450,7 +450,7 @@ struct RWlockInner {
  */
 struct RWlock {
     priv order_lock:  Semaphore,
-    priv access_lock: Sem<~[mut Waitqueue]>,
+    priv access_lock: Sem<~[Waitqueue]>,
     priv state:       Exclusive<RWlockInner>
 }
 
index ee1684db1f2f5c733adbfa09127a8a3385a4aca3..d7efff4d02a731d975cdb5e437d9e297a5f4b91a 100644 (file)
@@ -119,7 +119,7 @@ pub fn tok_str(++t: token) -> ~str {
     }
 }
 
-pub fn buf_str(toks: ~[mut token], szs: ~[mut int], left: uint, right: uint,
+pub fn buf_str(toks: ~[token], szs: ~[int], left: uint, right: uint,
                lim: uint) -> ~str {
     let n = vec::len(toks);
     assert (n == vec::len(szs));
index ffd169c7081c862c311da810892d00006ba1bcc7..27083d2583bab861a4aba624ac3d6aac626b3de1 100644 (file)
@@ -32,7 +32,7 @@
 export grid_t, read_grid, solve_grid, write_grid;
 
 // internal type of sudoku grids
-type grid = ~[~[mut u8]];
+type grid = ~[~[u8]];
 
 // exported type of sudoku grids
 enum grid_t { grid_ctor(grid), }
index 88263df954b22ffd3c76f48d85b506ad49c9e3e5..310d3e970864aed658b216b7df32ba0e2514c1d7 100644 (file)
@@ -14,11 +14,11 @@ fn want_slice(v: &[int]) -> int {
     return sum;
 }
 
-fn has_mut_vec(+v: @~[mut int]) -> int {
+fn has_mut_vec(+v: @~[int]) -> int {
     want_slice(*v) //~ ERROR illegal borrow unless pure
         //~^ NOTE impure due to access to impure function
 }
 
 fn main() {
-    assert has_mut_vec(@~[mut 1, 2, 3]) == 6;
+    assert has_mut_vec(@~[1, 2, 3]) == 6;
 }
\ No newline at end of file
index e9dd047d5c63ff888e8563e705723be9b0e00686..78c4ed54c95edabcdacdbc2ebfcb00da2c33961f 100644 (file)
@@ -34,7 +34,7 @@ fn main() {
         let mut res = foo(x);
 
         let mut v = ~[];
-        v = move ~[mut (move res)] + v; //~ ERROR instantiating a type parameter with an incompatible type (needs `copy`, got `&static`, missing `copy`)
+        v = move ~[(move res)] + v; //~ ERROR instantiating a type parameter with an incompatible type (needs `copy`, got `&static`, missing `copy`)
         assert (v.len() == 2);
     }
 
index 316c832f0119e574f58001e2924f459f90086188..7869e39ba6ca6a8ec9c8848c92dd96c901e0fea7 100644 (file)
@@ -14,7 +14,7 @@ fn main() {
     let v = @mut ~[0];
 
     fn f(&&v: @mut ~[const int]) {
-        *v = ~[mut 3]
+        *v = ~[3]
     }
 
     f(v);
index bb1ce5b82f5aa25ca4bce4c8f3fbc9875256f0a4..f0147eb3d08cc095f06d98d95741a7baa574111c 100644 (file)
@@ -13,7 +13,7 @@
 fn main() {
     let mut v = ~[@mut ~mut ~[0]];
 
-    fn f(&&v: ~[mut @mut ~mut ~[const int]]) {
+    fn f(&&v: ~[@mut ~mut ~[const int]]) {
     }
 
     f(v);
index e2299597c2f58c8419aa956d86e751833fefe9f1..5723c49be8b38bb6cddf0910447a6e579c6e7d2d 100644 (file)
@@ -18,7 +18,7 @@ fn main() {
 
     fn f(&&v: *mut ~[const int]) {
         unsafe {
-            *v = ~[mut 3]
+            *v = ~[3]
         }
     }
 
index 1ee2bb18321c3b536f49aa6c9d287ee8aa350098..fc4be7f588b9e0b63ba1c1e0a5eca94fb77b4c48 100644 (file)
@@ -14,7 +14,7 @@ fn main() {
     let v = {mut g: ~[0]};
 
     fn f(&&v: {mut g: ~[const int]}) {
-        v.g = ~[mut 3]
+        v.g = ~[3]
     }
 
     f(v);
index f2188911346e99fb825884cb4bf2e5bd394d87e8..633d2230aea8bf7f14f0b617494db0bd2ce0c906 100644 (file)
@@ -14,7 +14,7 @@ fn main() {
     let v = ~mut ~[0];
 
     fn f(&&v: ~mut ~[const int]) {
-        *v = ~[mut 3]
+        *v = ~[3]
     }
 
     f(v);
index 93f734b39abc3e060288268d2b9a4cffc04ca18b..239ae377b9bb7c62583c1e9b2756a25dd9e13838 100644 (file)
 fn main() {
     // Note: explicit type annot is required here
     // because otherwise the inference gets smart
-    // and assigns a type of ~[mut ~[const int]].
+    // and assigns a type of ~[~[const int]].
     let mut v: ~[~[int]] = ~[~[0]];
 
-    fn f(&&v: ~[mut ~[const int]]) {
-        v[0] = ~[mut 3]
+    fn f(&&v: ~[~[const int]]) {
+        v[0] = ~[3]
     }
 
     f(v); //~ ERROR (values differ in mutability)
index e205bb6b0a2f1405d2b3fc821bcb63b077e13802..239ae377b9bb7c62583c1e9b2756a25dd9e13838 100644 (file)
 fn main() {
     // Note: explicit type annot is required here
     // because otherwise the inference gets smart
-    // and assigns a type of ~[mut ~[const int]].
-    let mut v: ~[~[mut int]] = ~[~[0]];
+    // and assigns a type of ~[~[const int]].
+    let mut v: ~[~[int]] = ~[~[0]];
 
-    fn f(&&v: ~[mut ~[const int]]) {
+    fn f(&&v: ~[~[const int]]) {
         v[0] = ~[3]
     }
 
index 8046db3cd98f66de90c7a5430cee865c185e0a39..ffcd79772ad3dd28041bb07e3470b0fb2f5843bd 100644 (file)
 fn main() {
     // Note: explicit type annot is required here
     // because otherwise the inference gets smart
-    // and assigns a type of ~[mut ~[const int]].
-    let mut v: ~[~[mut ~[int]]] = ~[~[~[0]]];
+    // and assigns a type of ~[~[const int]].
+    let mut v: ~[~[~[int]]] = ~[~[~[0]]];
 
-    fn f(&&v: ~[mut ~[mut ~[const int]]]) {
-        v[0][1] = ~[mut 3]
+    fn f(&&v: ~[~[~[const int]]]) {
+        v[0][1] = ~[3]
     }
 
     f(v); //~ ERROR (values differ in mutability)
index 046f6b71d0089a2a5cea55bf7b10d053db955845..dd65dac5d93f307ddcea33ee75c7538dbb2c7148 100644 (file)
@@ -17,19 +17,19 @@ fn main() {
     let mut w = ~[~[0]];
     let mut x = ~[~[0]];
 
-    fn f(&&v: ~[mut ~[int]]) {
+    fn f(&&v: ~[~[int]]) {
         v[0] = ~[3]
     }
 
     fn g(&&v: ~[const ~[const int]]) {
     }
 
-    fn h(&&v: ~[mut ~[mut int]]) {
-        v[0] = ~[mut 3]
+    fn h(&&v: ~[~[int]]) {
+        v[0] = ~[3]
     }
 
-    fn i(&&v: ~[mut ~[const int]]) {
-        v[0] = ~[mut 3]
+    fn i(&&v: ~[~[const int]]) {
+        v[0] = ~[3]
     }
 
     fn j(&&v: ~[~[const int]]) {
@@ -48,7 +48,7 @@ fn j(&&v: ~[~[const int]]) {
     j(w); //~ ERROR (values differ in mutability)
 
     // Note that without adding f() or h() to the mix, it is valid for
-    // x to have the type ~[mut ~[const int]], and thus we can safely
+    // x to have the type ~[~[const int]], and thus we can safely
     // call g() and i() but not j():
     g(x);
     i(x);
index b8c7eb4a204bc050ec9db195845d909287fad4ef..b708f50004fa7d920cbbb39f25351ceb9dcb8bd9 100644 (file)
@@ -44,7 +44,7 @@ fn main() {
     foo({f: 3});
     foo({mut f: 3}); //~ ERROR missing `const`
     foo(~[1]);
-    foo(~[mut 1]); //~ ERROR missing `const`
+    foo(~[1]); //~ ERROR missing `const`
     foo(~1);
     foo(~mut 1); //~ ERROR missing `const`
     foo(@1);
index 0eaf40e110f10b8fb682da0bb5d0ac51acbcf73d..445f23ac46b35c6b4e7288bed1de3961b382805d 100644 (file)
@@ -14,7 +14,7 @@
 // the right hand side in all cases. We are getting compiler errors
 // about this now, so I'm xfailing the test for now. -eholk
 
-fn add(i: ~[int], m: ~[mut int], c: ~[const int]) {
+fn add(i: ~[int], m: ~[int], c: ~[const int]) {
 
     // Check that:
     //  (1) vectors of any two mutabilities can be added
@@ -24,9 +24,9 @@ fn add(i: ~[int], m: ~[mut int], c: ~[const int]) {
        m + ~[3],
        ~[3]);
 
-   add(i + ~[mut 3],
-       m + ~[mut 3],
-       ~[mut 3]);
+   add(i + ~[3],
+       m + ~[3],
+       ~[3]);
 
    add(i + i,
        m + i,
@@ -54,19 +54,19 @@ fn add(i: ~[int], m: ~[mut int], c: ~[const int]) {
                 //~^ mismatched types
        ~[3]);
 
-   add(m + ~[mut 3], //~ ERROR mismatched types
-       m + ~[mut 3],
-       m + ~[mut 3]);
+   add(m + ~[3], //~ ERROR mismatched types
+       m + ~[3],
+       m + ~[3]);
 
-   add(i + ~[mut 3],
-       i + ~[mut 3], //~ ERROR mismatched types
-       i + ~[mut 3]);
+   add(i + ~[3],
+       i + ~[3], //~ ERROR mismatched types
+       i + ~[3]);
 
-   add(c + ~[mut 3], //~ ERROR binary operation + cannot be applied
+   add(c + ~[3], //~ ERROR binary operation + cannot be applied
                     //~^ mismatched types
-       c + ~[mut 3], //~ ERROR binary operation + cannot be applied
+       c + ~[3], //~ ERROR binary operation + cannot be applied
                     //~^ mismatched types
-       ~[mut 3]);
+       ~[3]);
 
    add(m + i, //~ ERROR mismatched types
        m + i,
index 7d6c0bf6a9d684733c744bd20586b3f8906a3a60..a53dab33b978c5417b17b20733fe2f2798f22245 100644 (file)
@@ -14,10 +14,10 @@ fn want_slice(v: &[int]) -> int {
     return sum;
 }
 
-fn has_mut_vec(+v: ~[mut int]) -> int {
+fn has_mut_vec(+v: ~[int]) -> int {
     want_slice(v)
 }
 
 fn main() {
-    assert has_mut_vec(~[mut 1, 2, 3]) == 6;
+    assert has_mut_vec(~[1, 2, 3]) == 6;
 }
\ No newline at end of file
index 50ca15cbd1d6be8d249c077f68ff25e73f6eed6a..2bad284ad53b3ca411214c3a5c954bd9c054a139 100644 (file)
@@ -51,7 +51,7 @@ struct AsciiArt
     width: uint,
     height: uint,
     priv fill: char,
-    priv lines: ~[~[mut char]],
+    priv lines: ~[~[char]],
 
     // This struct can be quite large so we'll disable copying: developers need
     // to either pass these structs around via borrowed pointers or move them.
index a9e3f9d026179b98aa08d365c7e2c24e1e40176b..2f5771ca5ae1869e44869ab7b88f03bc278f1558 100644 (file)
@@ -15,9 +15,9 @@ enum option<T> {
     some(T),
 }
 
-struct Smallintmap<T> {mut v: ~[mut option<T>]}
+struct Smallintmap<T> {mut v: ~[option<T>]}
 
-struct V<T> { v: ~[mut option<T>] }
+struct V<T> { v: ~[option<T>] }
 
 fn mk<T>() -> @Smallintmap<T> {
     let mut v: ~[option<T>] = ~[];
index 759e3c16e0f423407783a3bcd07fcbbdafaa67d5..34e7795918c72cdedc684d523086434d7ada6e2f 100644 (file)
@@ -14,5 +14,5 @@ struct Pair { a: int, b: int}
 fn main() {
     // This just tests whether the vec leaks its members.
     let mut pvec: ~[@Pair] =
-        ~[mut @Pair{a: 1, b: 2}, @Pair{a: 3, b: 4}, @Pair{a: 5, b: 6}];
+        ~[@Pair{a: 1, b: 2}, @Pair{a: 3, b: 4}, @Pair{a: 5, b: 6}];
 }