about summary refs log tree commit diff
path: root/src/libcore/vec.rs
diff options
context:
space:
mode:
authorTim Chevalier <chevalier@alum.wellesley.edu>2012-09-11 17:17:54 -0700
committerTim Chevalier <chevalier@alum.wellesley.edu>2012-09-11 20:02:34 -0700
commitc087886e9321d6086ed3a623ec571da35fb865bf (patch)
tree51949005b792266cf48fe1f53b25cc587732eb75 /src/libcore/vec.rs
parent2c6c963f61d84d2a959df0d5c82f519c157ef552 (diff)
Make moves explicit in arguments
Diffstat (limited to 'src/libcore/vec.rs')
-rw-r--r--src/libcore/vec.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libcore/vec.rs b/src/libcore/vec.rs
index b4985389e25..38340c2b8d1 100644
--- a/src/libcore/vec.rs
+++ b/src/libcore/vec.rs
@@ -271,12 +271,12 @@ pure fn build_sized_opt<A>(size: Option<uint>,
 
 /// Produces a mut vector from an immutable vector.
 pure fn to_mut<T>(+v: ~[T]) -> ~[mut T] {
-    unsafe { ::unsafe::transmute(v) }
+    unsafe { ::unsafe::transmute(move v) }
 }
 
 /// Produces an immutable vector from a mut vector.
 pure fn from_mut<T>(+v: ~[mut T]) -> ~[T] {
-    unsafe { ::unsafe::transmute(v) }
+    unsafe { ::unsafe::transmute(move v) }
 }
 
 // Accessors
@@ -580,7 +580,7 @@ unsafe fn push_fast<T>(&v: ~[const T], +initval: T) {
     (**repr).fill += sys::size_of::<T>();
     let p = ptr::addr_of((**repr).data);
     let p = ptr::offset(p, fill) as *mut T;
-    rusti::move_val_init(*p, initval);
+    rusti::move_val_init(*p, move initval);
 }
 
 #[inline(never)]
@@ -1835,7 +1835,7 @@ mod unsafe {
             let mut box2 = None;
             box2 <-> box;
             rusti::move_val_init(*ptr::mut_offset(p, i),
-                                 option::unwrap(box2));
+                                 option::unwrap(move box2));
         }
     }