]> git.lizzy.rs Git - rust.git/commitdiff
Remove uses of binary move - <- - from tests and libraries
authorTim Chevalier <chevalier@alum.wellesley.edu>
Tue, 23 Oct 2012 18:11:23 +0000 (11:11 -0700)
committerTim Chevalier <chevalier@alum.wellesley.edu>
Tue, 23 Oct 2012 19:10:03 +0000 (12:10 -0700)
69 files changed:
src/fuzzer/ivec_fuzz.rs
src/libcore/dvec.rs
src/libcore/io.rs
src/libcore/iter.rs
src/libcore/option.rs
src/libcore/pipes.rs
src/libcore/private.rs
src/libcore/str.rs
src/libcore/task/spawn.rs
src/libcore/util.rs
src/libcore/vec.rs
src/libstd/arc.rs
src/libstd/map.rs
src/libstd/sort.rs
src/libstd/sync.rs
src/test/bench/core-std.rs
src/test/bench/msgsend-pipes-shared.rs
src/test/bench/msgsend-pipes.rs
src/test/bench/msgsend-ring-mutex-arcs.rs
src/test/bench/msgsend-ring-pipes.rs
src/test/bench/msgsend-ring-rw-arcs.rs
src/test/bench/pingpong.rs
src/test/bench/task-perf-word-count-generic.rs
src/test/compile-fail/block-deinitializes-upvar.rs
src/test/compile-fail/borrowck-issue-2657-1.rs
src/test/compile-fail/borrowck-issue-2657-2.rs
src/test/compile-fail/borrowck-move-from-unsafe-ptr.rs
src/test/compile-fail/borrowck-no-cycle-in-exchange-heap.rs
src/test/compile-fail/copy-a-resource.rs
src/test/compile-fail/issue-2548.rs
src/test/compile-fail/liveness-move-in-loop.rs
src/test/compile-fail/liveness-move-in-while.rs
src/test/compile-fail/liveness-use-after-move.rs
src/test/compile-fail/noncopyable-class.rs
src/test/compile-fail/obsolete-syntax.rs
src/test/compile-fail/unique-pinned-nocopy.rs
src/test/compile-fail/unique-vec-res.rs
src/test/compile-fail/vec-res-add.rs
src/test/run-fail/unwind-resource-fail.rs
src/test/run-fail/unwind-resource-fail2.rs
src/test/run-pass/borrowck-move-from-unsafe-ptr-ok.rs
src/test/run-pass/borrowck-mut-uniq.rs
src/test/run-pass/import-glob-1.rs
src/test/run-pass/init-res-into-things.rs
src/test/run-pass/issue-2185.rs
src/test/run-pass/issue-2718.rs
src/test/run-pass/move-1-unique.rs
src/test/run-pass/move-1.rs
src/test/run-pass/move-2-unique.rs
src/test/run-pass/move-2.rs
src/test/run-pass/move-3-unique.rs
src/test/run-pass/move-3.rs
src/test/run-pass/move-4-unique.rs
src/test/run-pass/move-4.rs
src/test/run-pass/move-scalar.rs
src/test/run-pass/pipe-bank-proto.rs
src/test/run-pass/resource-destruct.rs
src/test/run-pass/resource-generic.rs
src/test/run-pass/unique-decl-move-temp.rs
src/test/run-pass/unique-decl-move.rs
src/test/run-pass/unique-move-drop.rs
src/test/run-pass/unique-move-temp.rs
src/test/run-pass/unique-move.rs
src/test/run-pass/unreachable-code-1.rs
src/test/run-pass/unreachable-code.rs
src/test/run-pass/unwind-resource.rs
src/test/run-pass/unwind-resource2.rs
src/test/run-pass/weird-exprs.rs
src/test/run-pass/while-loop-constraints-2.rs

index 49d34e7699253eeeacdf925b6174c224e7d98e31..f6133b8f954988c5bf2cf284f01851b3e508f30a 100644 (file)
@@ -2,7 +2,7 @@
 
 Idea: provide functions for 'exhaustive' and 'random' modification of vecs.
 
-  two functions, "return all edits" and "return a random edit" <--
+  two functions, "return all edits" and "return a random edit" = move-
     leaning toward this model or two functions, "return the number of
     possible edits" and "return edit #n"
 
index 1b6a7522864efc5ed412023dbb9b9c4ad8d2bb1b..e01e3fea3e175852046df2a0ac5b9e83ab14a7b3 100644 (file)
@@ -72,7 +72,7 @@ pub fn from_vec<A>(v: ~[A]) -> DVec<A> {
 
 /// Consumes the vector and returns its contents
 pub fn unwrap<A>(d: DVec<A>) -> ~[A] {
-    let DVec_({data: v}) <- d;
+    let DVec_({data: v}) = move d;
     move v
 }
 
@@ -150,13 +150,13 @@ fn swap_mut(f: &fn(v: ~[mut A]) -> ~[mut A]) {
     /// Overwrite the current contents
     fn set(w: ~[A]) {
         self.check_not_borrowed();
-        self.data <- w;
+        self.data = move w;
     }
 
     /// Remove and return the last element
     fn pop() -> A {
         do self.check_out |v| {
-            let mut v <- v;
+            let mut v = move v;
             let result = v.pop();
             self.give_back(move v);
             move result
@@ -171,7 +171,7 @@ fn unshift(t: A) {
             let data_ptr: *() = cast::reinterpret_cast(&data);
             if data_ptr.is_null() { fail ~"Recursive use of dvec"; }
             log(error, ~"a");
-            self.data <- ~[move t];
+            self.data = move ~[move t];
             self.data.push_all_move(move data);
             log(error, ~"b");
         }
@@ -235,7 +235,7 @@ fn push_all(ts: &[const A]) {
     /// Appends elements from `from_idx` to `to_idx` (exclusive)
     fn push_slice(ts: &[const A], from_idx: uint, to_idx: uint) {
         do self.swap |v| {
-            let mut v <- v;
+            let mut v = move v;
             let new_len = vec::len(v) + to_idx - from_idx;
             vec::reserve(&mut v, new_len);
             let mut i = from_idx;
@@ -260,7 +260,7 @@ fn append_iter<A, I:iter::base_iter<A>>(ts: I) {
              none { v }
              Some(h) {
                let len = v.len() + h;
-               let mut v <- v;
+               let mut v = move v;
                vec::reserve(v, len);
                v
             }
index 77f7b5023dfa97839cba366780738bbc51b3d750..77074a473e260dbf8ee17fbf3045e74b9df42ccf 100644 (file)
@@ -698,7 +698,7 @@ pub struct BytesWriter {
 impl BytesWriter: Writer {
     fn write(v: &[const u8]) {
         do self.bytes.swap |bytes| {
-            let mut bytes <- bytes;
+            let mut bytes = move bytes;
             let v_len = v.len();
             let bytes_len = bytes.len();
 
index 322012db135ba673205416b2293e26a305ee3e8f..f79a2e8f17b4b29354d425a9eed1ddc2daab8ae6 100644 (file)
@@ -128,7 +128,7 @@ pub trait Buildable<A> {
 pub pure fn foldl<A,B,IA:BaseIter<A>>(self: &IA, b0: B,
                                       blk: fn(&B, &A) -> B)
     -> B {
-    let mut b <- b0;
+    let mut b = move b0;
     for self.each |a| {
         b = blk(&b, a);
     }
index baabc35b428c2c1fc92fb6cb597438a1c0f5426b..3b1d2079800bf36991c5fc2a861d994727497453 100644 (file)
@@ -149,7 +149,7 @@ pub enum Option<T> {
 pub pure fn while_some<T>(x: Option<T>, blk: fn(v: T) -> Option<T>) {
     //! Applies a function zero or more times until the result is none.
 
-    let mut opt <- x;
+    let mut opt = move x;
     while opt.is_some() {
         opt = blk(unwrap(move opt));
     }
index 3f8de19498f628c0a7ef662b739d4b8867c22ab4..2c2cd6a528aae130fe6c6e63b8dd00e693ff8334 100644 (file)
@@ -86,7 +86,7 @@
 const SPIN_COUNT: uint = 0;
 
 macro_rules! move_it (
-    { $x:expr } => { unsafe { let y <- *ptr::addr_of(&($x)); move y } }
+    { $x:expr } => { unsafe { let y = move *ptr::addr_of(&($x)); move y } }
 )
 
 #[doc(hidden)]
@@ -363,7 +363,7 @@ pub fn send<T: Send, Tbuffer: Send>(p: SendPacketBuffered<T, Tbuffer>,
     let p = unsafe { &*p_ };
     assert ptr::addr_of(&(p.header)) == header;
     assert p.payload.is_none();
-    p.payload <- Some(move payload);
+    p.payload = move Some(move payload);
     let old_state = swap_state_rel(&mut p.header.state, Full);
     match old_state {
         Empty => {
@@ -708,7 +708,7 @@ pub fn select<T: Send, Tb: Send>(endpoints: ~[RecvPacketBuffered<T, Tb>])
     -> (uint, Option<T>, ~[RecvPacketBuffered<T, Tb>])
 {
     let ready = wait_many(endpoints.map(|p| p.header()));
-    let mut remaining <- endpoints;
+    let mut remaining = move endpoints;
     let port = remaining.swap_remove(ready);
     let result = try_recv(move port);
     (ready, move result, move remaining)
index 8e89a3de6a858de56c8d007ac171d1ea3772ec3b..c4298d572b6fd029274ede87596413d826bccafe 100644 (file)
@@ -562,9 +562,9 @@ unsafe fn with_imm<U>(f: fn(x: &T) -> U) -> U {
 
 // FIXME(#3724) make this a by-move method on the exclusive
 pub fn unwrap_exclusive<T: Send>(arc: Exclusive<T>) -> T {
-    let Exclusive { x: x } <- arc;
+    let Exclusive { x: x } = move arc;
     let inner = unsafe { unwrap_shared_mutable_state(move x) };
-    let ExData { data: data, _ } <- inner;
+    let ExData { data: data, _ } = move inner;
     move data
 }
 
index 0c722c437ee58a46f3be60a749752056cff78294..8031a46431562eb0aa114cd929746dcbefb5ae2b 100644 (file)
@@ -176,7 +176,7 @@ pub fn push_str(lhs: &mut ~str, rhs: &str) {
 /// Concatenate two strings together
 #[inline(always)]
 pub pure fn append(lhs: ~str, rhs: &str) -> ~str {
-    let mut v <- lhs;
+    let mut v = move lhs;
     unsafe {
         push_str_no_overallocate(&mut v, rhs);
     }
index 533e98514924ae78359342552600911935bdaaee..6fbb572df41e1126f1331a48951aaa25ddb3f93d 100644 (file)
@@ -67,7 +67,7 @@
 use rt::rust_closure;
 
 macro_rules! move_it (
-    { $x:expr } => { unsafe { let y <- *ptr::addr_of(&($x)); move y } }
+    { $x:expr } => { unsafe { let y = move *ptr::addr_of(&($x)); move y } }
 )
 
 type TaskSet = send_map::linear::LinearMap<*rust_task,()>;
@@ -168,10 +168,10 @@ fn coalesce(list:            &mut AncestorList,
         if coalesce_this.is_some() {
             // Needed coalesce. Our next ancestor becomes our old
             // ancestor's next ancestor. ("next = old_next->next;")
-            *list <- option::unwrap(move coalesce_this);
+            *list = move option::unwrap(move coalesce_this);
         } else {
             // No coalesce; restore from tmp. ("next = old_next;")
-            *list <- tmp_list;
+            *list = move tmp_list;
         }
         return early_break;
     }
@@ -265,7 +265,7 @@ fn with_parent_tg<U>(parent_group: &mut Option<TaskGroupArc>,
             // If this trips, more likely the problem is 'blk' failed inside.
             let tmp_arc = option::swap_unwrap(parent_group);
             let result = do access_group(&tmp_arc) |tg_opt| { blk(tg_opt) };
-            *parent_group <- Some(move tmp_arc);
+            *parent_group = move Some(move tmp_arc);
             move result
         }
     }
@@ -480,7 +480,7 @@ fn share_ancestors(ancestors: &mut AncestorList) -> AncestorList {
         if tmp.is_some() {
             let ancestor_arc = option::unwrap(move tmp);
             let result = ancestor_arc.clone();
-            **ancestors <- Some(move ancestor_arc);
+            **ancestors = move Some(move ancestor_arc);
             AncestorList(Some(move result))
         } else {
             AncestorList(None)
index 8380cbf6b638ed03df241bbdc44b4911bcacdb31..9e20653f4daf6d6c4ddf008865610c0d7e2689bf 100644 (file)
@@ -51,7 +51,7 @@ pub fn swap<T>(x: &mut T, y: &mut T) {
  */
 #[inline(always)]
 pub fn replace<T>(dest: &mut T, src: T) -> T {
-    let mut tmp <- src;
+    let mut tmp = move src;
     swap(dest, &mut tmp);
     move tmp
 }
index 2e91c4b22c43f61482795e6a702f5011a17c3c22..efed497651e878dd3edc5e409ea4a1ddc7447cc4 100644 (file)
@@ -399,10 +399,10 @@ pub fn shift<T>(v: &mut ~[T]) -> T {
         let mut rr;
         {
             let vv = raw::to_ptr(vv);
-            rr <- *vv;
+            rr = move *vv;
 
             for uint::range(1, ln) |i| {
-                let r <- *ptr::offset(vv, i);
+                let r = move *ptr::offset(vv, i);
                 v.push(move r);
             }
         }
@@ -424,7 +424,7 @@ pub fn consume<T>(v: ~[T], f: fn(uint, v: T)) unsafe {
 
     do as_imm_buf(v) |p, ln| {
         for uint::range(0, ln) |i| {
-            let x <- *ptr::offset(p, i);
+            let x = move *ptr::offset(p, i);
             f(i, move x);
         }
     }
@@ -515,7 +515,7 @@ pub fn push_all_move<T>(v: &mut ~[T], rhs: ~[T]) {
     unsafe {
         do as_imm_buf(rhs) |p, len| {
             for uint::range(0, len) |i| {
-                let x <- *ptr::offset(p, i);
+                let x = move *ptr::offset(p, i);
                 push(v, move x);
             }
         }
@@ -530,7 +530,7 @@ pub fn truncate<T>(v: &mut ~[T], newlen: uint) {
         unsafe {
             // This loop is optimized out for non-drop types.
             for uint::range(newlen, oldlen) |i| {
-                let _dropped <- *ptr::offset(p, i);
+                let _dropped = move *ptr::offset(p, i);
             }
             raw::set_len(v, newlen);
         }
@@ -553,12 +553,12 @@ pub fn dedup<T: Eq>(v: &mut ~[T]) unsafe {
             // last_written < next_to_read < ln
             if *ptr::mut_offset(p, next_to_read) ==
                 *ptr::mut_offset(p, last_written) {
-                let _dropped <- *ptr::mut_offset(p, next_to_read);
+                let _dropped = move *ptr::mut_offset(p, next_to_read);
             } else {
                 last_written += 1;
                 // last_written <= next_to_read < ln
                 if next_to_read != last_written {
-                    *ptr::mut_offset(p, last_written) <-
+                    *ptr::mut_offset(p, last_written) = move
                         *ptr::mut_offset(p, next_to_read);
                 }
             }
@@ -575,7 +575,7 @@ pub fn dedup<T: Eq>(v: &mut ~[T]) unsafe {
 // Appending
 #[inline(always)]
 pub pure fn append<T: Copy>(lhs: ~[T], rhs: &[const T]) -> ~[T] {
-    let mut v <- lhs;
+    let mut v = move lhs;
     unsafe {
         v.push_all(rhs);
     }
@@ -584,7 +584,7 @@ pub fn dedup<T: Eq>(v: &mut ~[T]) unsafe {
 
 #[inline(always)]
 pub pure fn append_one<T>(lhs: ~[T], x: T) -> ~[T] {
-    let mut v <- lhs;
+    let mut v = move lhs;
     unsafe { v.push(move x); }
     move v
 }
@@ -1052,9 +1052,9 @@ pub fn swap<T>(v: &[mut T], a: uint, b: uint) {
 
 /// Reverse the order of elements in a vector, in place
 pub fn reverse<T>(v: &[mut T]) {
-    let mut i: uint = 0u;
+    let mut i: uint = 0;
     let ln = len::<T>(v);
-    while i < ln / 2u { v[i] <-> v[ln - i - 1u]; i += 1u; }
+    while i < ln / 2 { v[i] <-> v[ln - i - 1]; i += 1; }
 }
 
 /// Returns a vector with the order of elements reversed
index 9c793028a52d04b458ec368f573d840a0a3a4c02..2f4c9a4eb06f415b838b0b32802f60e0a5beb491 100644 (file)
@@ -99,7 +99,7 @@ pub fn clone<T: Const Send>(rc: &ARC<T>) -> ARC<T> {
  * guaranteed to deadlock.
  */
 fn unwrap<T: Const Send>(rc: ARC<T>) -> T {
-    let ARC { x: x } <- rc;
+    let ARC { x: x } = move rc;
     unsafe { unwrap_shared_mutable_state(move x) }
 }
 
@@ -192,9 +192,9 @@ unsafe fn access_cond<U>(blk: fn(x: &x/mut T, c: &c/Condvar) -> U) -> U {
  */
 // FIXME(#3724) make this a by-move method on the arc
 pub fn unwrap_mutex_arc<T: Send>(arc: MutexARC<T>) -> T {
-    let MutexARC { x: x } <- arc;
+    let MutexARC { x: x } = move arc;
     let inner = unsafe { unwrap_shared_mutable_state(move x) };
-    let MutexARCInner { failed: failed, data: data, _ } <- inner;
+    let MutexARCInner { failed: failed, data: data, _ } = move inner;
     if failed {
         fail ~"Can't unwrap poisoned MutexARC - another task failed inside!"
     }
@@ -347,7 +347,7 @@ fn write_downgrade<U>(blk: fn(v: RWWriteMode<T>) -> U) -> U {
     fn downgrade(token: RWWriteMode/&a<T>) -> RWReadMode/&a<T> {
         // The rwlock should assert that the token belongs to us for us.
         let state = unsafe { get_shared_immutable_state(&self.x) };
-        let RWWriteMode((data, t, _poison)) <- token;
+        let RWWriteMode((data, t, _poison)) = move token;
         // Let readers in
         let new_token = (&state.lock).downgrade(move t);
         // Whatever region the input reference had, it will be safe to use
@@ -370,9 +370,9 @@ fn downgrade(token: RWWriteMode/&a<T>) -> RWReadMode/&a<T> {
  */
 // FIXME(#3724) make this a by-move method on the arc
 pub fn unwrap_rw_arc<T: Const Send>(arc: RWARC<T>) -> T {
-    let RWARC { x: x, _ } <- arc;
+    let RWARC { x: x, _ } = move arc;
     let inner = unsafe { unwrap_shared_mutable_state(move x) };
-    let RWARCInner { failed: failed, data: data, _ } <- inner;
+    let RWARCInner { failed: failed, data: data, _ } = move inner;
     if failed {
         fail ~"Can't unwrap poisoned RWARC - another task failed inside!"
     }
index e49f1abd02b4d599cd04a72260df938aa705cc6f..0ee7cb6fcf967c769c8e243913a17ab6fb7e143d 100644 (file)
@@ -173,7 +173,7 @@ fn rehash() {
                 entry.next = new_chains[idx];
                 new_chains[idx] = Some(entry);
             }
-            self.chains <- new_chains;
+            self.chains = move new_chains;
         }
 
         pure fn each_entry(blk: fn(@Entry<K,V>) -> bool) {
index 0b00da9f81d7bca9cda13ffc9e6bae7a013565df..8c8971b7eb75bd603d6b9251a4a353b088793299 100644 (file)
@@ -15,7 +15,7 @@
 pub fn merge_sort<T: Copy>(le: Le<T>, v: &[const T]) -> ~[T] {
     type Slice = (uint, uint);
 
-    return merge_sort_(le, v, (0u, len(v)));
+    return merge_sort_(le, v, (0, len(v)));
 
     fn merge_sort_<T: Copy>(le: Le<T>, v: &[const T], slice: Slice)
         -> ~[T] {
@@ -23,10 +23,10 @@ fn merge_sort_<T: Copy>(le: Le<T>, v: &[const T], slice: Slice)
         let end = slice.second();
 
         let v_len = end - begin;
-        if v_len == 0u { return ~[]; }
-        if v_len == 1u { return ~[v[begin]]; }
+        if v_len == 0 { return ~[]; }
+        if v_len == 1 { return ~[v[begin]]; }
 
-        let mid = v_len / 2u + begin;
+        let mid = v_len / 2 + begin;
         let a = (begin, mid);
         let b = (mid, end);
         return merge(le, merge_sort_(le, v, a), merge_sort_(le, v, b));
@@ -35,14 +35,14 @@ fn merge_sort_<T: Copy>(le: Le<T>, v: &[const T], slice: Slice)
     fn merge<T: Copy>(le: Le<T>, a: &[T], b: &[T]) -> ~[T] {
         let mut rs = vec::with_capacity(len(a) + len(b));
         let a_len = len(a);
-        let mut a_ix = 0u;
+        let mut a_ix = 0;
         let b_len = len(b);
-        let mut b_ix = 0u;
+        let mut b_ix = 0;
         while a_ix < a_len && b_ix < b_len {
             if le(&a[a_ix], &b[b_ix]) {
                 rs.push(a[a_ix]);
-                a_ix += 1u;
-            } else { rs.push(b[b_ix]); b_ix += 1u; }
+                a_ix += 1;
+            } else { rs.push(b[b_ix]); b_ix += 1; }
         }
         rs = vec::append(rs, vec::slice(a, a_ix, a_len));
         rs = vec::append(rs, vec::slice(b, b_ix, b_len));
@@ -59,9 +59,9 @@ fn part<T: Copy>(compare_func: Le<T>, arr: &[mut T], left: uint,
     while i < right {
         if compare_func(&arr[i], &pivot_value) {
             arr[i] <-> arr[storage_index];
-            storage_index += 1u;
+            storage_index += 1;
         }
-        i += 1u;
+        i += 1;
     }
     arr[storage_index] <-> arr[right];
     return storage_index;
@@ -70,13 +70,13 @@ fn part<T: Copy>(compare_func: Le<T>, arr: &[mut T], left: uint,
 fn qsort<T: Copy>(compare_func: Le<T>, arr: &[mut T], left: uint,
              right: uint) {
     if right > left {
-        let pivot = (left + right) / 2u;
+        let pivot = (left + right) / 2;
         let new_pivot = part::<T>(compare_func, arr, left, right, pivot);
-        if new_pivot != 0u {
+        if new_pivot != 0 {
             // Need to do this check before recursing due to overflow
-            qsort::<T>(compare_func, arr, left, new_pivot - 1u);
+            qsort::<T>(compare_func, arr, left, new_pivot - 1);
         }
-        qsort::<T>(compare_func, arr, new_pivot + 1u, right);
+        qsort::<T>(compare_func, arr, new_pivot + 1, right);
     }
 }
 
@@ -87,8 +87,8 @@ fn qsort<T: Copy>(compare_func: Le<T>, arr: &[mut T], left: uint,
  * This is an unstable sort.
  */
 pub fn quick_sort<T: Copy>(compare_func: Le<T>, arr: &[mut T]) {
-    if len::<T>(arr) == 0u { return; }
-    qsort::<T>(compare_func, arr, 0u, len::<T>(arr) - 1u);
+    if len::<T>(arr) == 0 { return; }
+    qsort::<T>(compare_func, arr, 0, len::<T>(arr) - 1);
 }
 
 fn qsort3<T: Copy Ord Eq>(arr: &[mut T], left: int, right: int) {
@@ -167,11 +167,11 @@ mod test_qsort3 {
     fn check_sort(v1: &[mut int], v2: &[mut int]) {
         let len = vec::len::<int>(v1);
         quick_sort3::<int>(v1);
-        let mut i = 0u;
+        let mut i = 0;
         while i < len {
             log(debug, v2[i]);
             assert (v2[i] == v1[i]);
-            i += 1u;
+            i += 1;
         }
     }
 
@@ -208,11 +208,11 @@ fn check_sort(v1: &[mut int], v2: &[mut int]) {
         let len = vec::len::<int>(v1);
         pure fn leual(a: &int, b: &int) -> bool { *a <= *b }
         quick_sort::<int>(leual, v1);
-        let mut i = 0u;
+        let mut i = 0;
         while i < len {
             log(debug, v2[i]);
             assert (v2[i] == v1[i]);
-            i += 1u;
+            i += 1;
         }
     }
 
@@ -270,11 +270,11 @@ fn check_sort(v1: &[int], v2: &[int]) {
         pub pure fn le(a: &int, b: &int) -> bool { *a <= *b }
         let f = le;
         let v3 = merge_sort::<int>(f, v1);
-        let mut i = 0u;
+        let mut i = 0;
         while i < len {
             log(debug, v3[i]);
             assert (v3[i] == v2[i]);
-            i += 1u;
+            i += 1;
         }
     }
 
index 73fc78a091a4fd89e8ca7d022628f6581f96d165..43d1c9664a51f652c36b40db5a3ad9b697f4e064 100644 (file)
@@ -768,7 +768,7 @@ fn test_sem_runtime_friendly_blocking() {
     #[test]
     fn test_mutex_lock() {
         // Unsafely achieve shared state, and do the textbook
-        // "load tmp <- ptr; inc tmp; store ptr <- tmp" dance.
+        // "load tmp = move ptr; inc tmp; store ptr <- tmp" dance.
         let (c,p) = pipes::stream();
         let m = ~Mutex();
         let m2 = ~m.clone();
index 6f90a2c99e810660cbb924bc3ab89a0bdeb76a95..550da39cb11eab8927943d3f30768d3d8ff70abf 100644 (file)
@@ -1,3 +1,4 @@
+// xfail-pretty
 // Microbenchmarks for various functions in core and std
 
 extern mod std;
index 88ca0d3e0c2d606fbe12ed1c76924274cdf3239b..da891b376e3020b4ad260959944d0fa9af2cecc5 100644 (file)
@@ -19,7 +19,7 @@
 use pipes::{Port, Chan, SharedChan};
 
 macro_rules! move_out (
-    { $x:expr } => { unsafe { let y <- *ptr::addr_of(&($x)); move y } }
+    { $x:expr } => { unsafe { let y = move *ptr::addr_of(&($x)); move y } }
 )
 
 enum request {
index ce3fd5134ac5670ddc4af6b99385542fdac7076f..041094adcd50db7b9f61d936e61a77896b2d5797 100644 (file)
@@ -15,7 +15,7 @@
 use pipes::{Port, PortSet, Chan};
 
 macro_rules! move_out (
-    { $x:expr } => { unsafe { let y <- *ptr::addr_of(&($x)); move y } }
+    { $x:expr } => { unsafe { let y = move *ptr::addr_of(&($x)); move y } }
 )
 
 enum request {
index 3ec89567d206b43c72a44d23676001c96ded3935..ac0043b7309f54d83795385c66ee975150e80b6e 100644 (file)
@@ -41,8 +41,8 @@ fn thread_ring(i: uint,
                count: uint,
                +num_chan: pipe,
                +num_port: pipe) {
-    let mut num_chan <- Some(move num_chan);
-    let mut num_port <- Some(move num_port);
+    let mut num_chan = move Some(move num_chan);
+    let mut num_port = move Some(move num_port);
     // Send/Receive lots of messages.
     for uint::range(0u, count) |j| {
         //error!("task %?, iter %?", i, j);
index 68429ee01bb7da7224bd732dc921e560ba30e253..85e46bfcaec269938434fe8bc33df6e33e22d2bc 100644 (file)
@@ -24,7 +24,7 @@
 fn macros() {
     #macro[
         [#move_out[x],
-         unsafe { let y <- *ptr::addr_of(&x); move y }]
+         unsafe { let y = move *ptr::addr_of(&x); move y }]
     ];
 }
 
@@ -32,8 +32,8 @@ fn thread_ring(i: uint,
                count: uint,
                +num_chan: ring::client::num,
                +num_port: ring::server::num) {
-    let mut num_chan <- Some(move num_chan);
-    let mut num_port <- Some(move num_port);
+    let mut num_chan = move Some(move num_chan);
+    let mut num_port = move Some(move num_port);
     // Send/Receive lots of messages.
     for uint::range(0, count) |j| {
         //error!("task %?, iter %?", i, j);
index 5e3d2f7d3e08c9e1a62dee9669773835d57c9e89..f5c6a49a3646f36d34c1191257bae792cf030416 100644 (file)
@@ -41,8 +41,8 @@ fn thread_ring(i: uint,
                count: uint,
                +num_chan: pipe,
                +num_port: pipe) {
-    let mut num_chan <- Some(move num_chan);
-    let mut num_port <- Some(move num_port);
+    let mut num_chan = move Some(move num_chan);
+    let mut num_port = move Some(move num_port);
     // Send/Receive lots of messages.
     for uint::range(0u, count) |j| {
         //error!("task %?, iter %?", i, j);
index e7f9312ce386e6f6557cd6208f7c9113f0ea6068..fc2025511947bc0a59886f41d6ed4e3413a545c4 100644 (file)
@@ -33,7 +33,7 @@
 
 // This stuff should go in libcore::pipes
 macro_rules! move_it (
-    { $x:expr } => { let t <- *ptr::addr_of(&($x)); move t }
+    { $x:expr } => { let t = move *ptr::addr_of(&($x)); move t }
 )
 
 macro_rules! follow (
index 3fe192ed36391e3be804bfcc843ca1a6a9ea53a6..383bc9bd79bf3973d4dfd7503e0a7252982e8a8d 100644 (file)
@@ -30,7 +30,7 @@
 use to_bytes::IterBytes;
 
 macro_rules! move_out (
-    { $x:expr } => { unsafe { let y <- *ptr::addr_of(&($x)); move y } }
+    { $x:expr } => { unsafe { let y = move *ptr::addr_of(&($x)); move y } }
 )
 
 trait word_reader {
index cfcf2bffb34476b02a2dde2d9298f5335c006218..5d0ee52e64ab893fa8100ec7d4ddcb6730da11d4 100644 (file)
@@ -4,5 +4,5 @@ fn main() {
     let mut x = @{x: 17, y: 2};
     let y = @{x: 5, y: 5};
 
-    force(|| x <- y );
+    force(|| x = move y );
 }
index 98947fbd1a2ec19e3ea62cb303ba6ae763b91e72..a7b78317e44732bd4b526ccbede4a7217b071d57 100644 (file)
@@ -2,7 +2,7 @@ fn main() {
 let x = Some(~1);
 match x { //~ NOTE loan of immutable local variable granted here
   Some(ref _y) => {
-    let _a <- x; //~ ERROR moving out of immutable local variable prohibited due to outstanding loan
+    let _a = move x; //~ ERROR moving out of immutable local variable prohibited due to outstanding loan
   }
   _ => {}
 }
index f04c323afba6d543ff26fe42511fb27b827ccd7a..019ae31609888b3cf4b8683a7624cf804b0d0cf0 100644 (file)
@@ -2,7 +2,7 @@ fn main() {
 let x = Some(~1);
 match x {
   Some(ref y) => {
-    let _b <- *y; //~ ERROR moving out of dereference of immutable & pointer
+    let _b = move *y; //~ ERROR moving out of dereference of immutable & pointer
   }
   _ => {}
 }
index 71bba89fb77df92c806577e657643897855b3a31..ce500492aea9435995763b5b23faf3a5134bccc5 100644 (file)
@@ -1,5 +1,5 @@
 fn foo(x: *~int) -> ~int {
-    let y <- *x; //~ ERROR dereference of unsafe pointer requires unsafe function or block
+    let y = move *x; //~ ERROR dereference of unsafe pointer requires unsafe function or block
     return y;
 }
 
index beab4d3409e1af93446098f48d742f45bca2e0b0..c91c4819661ebf1cef8c95015ee543a797121cad 100644 (file)
@@ -7,7 +7,7 @@ fn main() {
     // Create a cycle!
     match *x { //~ NOTE loan of immutable local variable granted here
       node(ref y) => {
-        y.a <- x; //~ ERROR moving out of immutable local variable prohibited due to outstanding loan
+        y.a = move x; //~ ERROR moving out of immutable local variable prohibited due to outstanding loan
       }
       empty => {}
     };
index 3bfdaa8566688804e6160b772e4c807897c0cd15..dc9237e6318003fbbccc2ca6ce8b7223ac865939 100644 (file)
@@ -11,4 +11,4 @@ fn foo(i:int) -> foo {
     }
 }
 
-fn main() { let x <- foo(10); let y = x; log(error, x); }
+fn main() { let x = move foo(10); let y = x; log(error, x); }
index 0d491fc8834acce08d84a3dc1967d568bb1dfd03..33886b289347f404738869bd8734afc1b07cdc27 100644 (file)
@@ -21,7 +21,7 @@ fn main() {
         let mut res = foo(x);
         
         let mut v = ~[mut];
-        v <- ~[mut (move res)] + v; //~ ERROR instantiating a type parameter with an incompatible type (needs `copy`, got `owned`, missing `copy`)
+        v = move ~[mut (move res)] + v; //~ ERROR instantiating a type parameter with an incompatible type (needs `copy`, got `owned`, missing `copy`)
         assert (v.len() == 2);
     }
 
index d9233e41e38a9e0901ee26633d15806c9b25c1df..091112a3150ead9f9e306a24a0e68ff5beef6dd9 100644 (file)
@@ -7,8 +7,11 @@ fn main() {
         loop {
             loop {
                 loop {
-                    x <- y; //~ ERROR use of moved variable
+// tjc: Not sure why it prints the same error twice
+                    x = move y; //~ ERROR use of moved variable
                     //~^ NOTE move of variable occurred here
+                    //~^^ ERROR use of moved variable
+                    //~^^^ NOTE move of variable occurred here
 
                     copy x;
                 }
index 261eb31089084641eb8285632936938d39fee5b7..66ca21534b3ea8dda3693911ce75b6c81f7edbf4 100644 (file)
@@ -4,8 +4,11 @@ fn main() {
     let mut x: int;
     loop {
         log(debug, y);
-        while true { while true { while true { x <- y; copy x; } } }
+// tjc: not sure why it prints the same error twice
+        while true { while true { while true { x = move y; copy x; } } }
         //~^ ERROR use of moved variable: `y`
         //~^^ NOTE move of variable occurred here
+        //~^^^ ERROR use of moved variable: `y`
+        //~^^^^ NOTE move of variable occurred here
     }
 }
index f060fe8307f0e809b9a58dcee3462a8098b410d9..39068635a06f4e93dfd1d4e5740ea2db56ba0c7f 100644 (file)
@@ -1,6 +1,6 @@
 fn main() {
     let x = @5;
-    let y <- x; //~ NOTE move of variable occurred here
+    let y = move x; //~ NOTE move of variable occurred here
     log(debug, *x); //~ ERROR use of moved variable: `x`
     copy y;
 }
index 33aef1c0a724391dc9ac8f883867cb088b863a30..af43fe66b4b30468315827143042ae69ed76eace 100644 (file)
@@ -25,4 +25,4 @@ fn foo(i:int) -> foo {
     }
 }
 
-fn main() { let x <- foo(10); let y = x; log(error, x); }
+fn main() { let x = move foo(10); let y = x; log(error, x); }
index c8a8bd859615f96fce990df40f40d011d804ac31..4be54708428788af3a5683bae0c6621d8a3265d7 100644 (file)
@@ -67,4 +67,12 @@ fn obsolete_fixed_length_vec() {
     //~^ ERROR obsolete syntax: fixed-length vector
 }
 
+fn obsolete_moves() {
+    let mut x = 0;
+    let y <- x;
+    //~^ ERROR obsolete syntax: initializer-by-move
+    y <- x; 
+    //~^ ERROR obsolete syntax: binary move
+}
+
 fn main() { }
index 1a6680af381665675d1faf4d1c89da91ec421f4e..83d1b8393e8546f7da167e8ce076116ced84df98 100644 (file)
@@ -6,7 +6,7 @@ struct r {
 }
 
 fn main() {
-    let i <- ~r { b: true };
+    let i = move ~r { b: true };
     let j = i;
     log(debug, i);
 }
\ No newline at end of file
index d5211906f89be0ae7ba9bca689139e34527ad24f..c89a61f12205cea9952d9aa986f57b83cd9cbaca 100644 (file)
@@ -12,8 +12,8 @@ fn f<T>(+i: ~[T], +j: ~[T]) {
 fn main() {
     let i1 = @mut 0;
     let i2 = @mut 1;
-    let r1 <- ~[~r { i: i1 }];
-    let r2 <- ~[~r { i: i2 }];
+    let r1 = move ~[~r { i: i1 }];
+    let r2 = move ~[~r { i: i2 }];
     f(r1, r2);
     log(debug, (r2, *i1));
     log(debug, (r1, *i2));
index 4b558d7fe8f15d4a33aee41b00ed2250e18aedd1..737f0382b6260c556bc09e7c8eda45827716752f 100644 (file)
@@ -9,8 +9,8 @@ struct r {
 
 fn main() {
     // This can't make sense as it would copy the classes
-    let i <- ~[r(0)];
-    let j <- ~[r(1)];
+    let i = move ~[r(0)];
+    let j = move ~[r(1)];
     let k = i + j;
     log(debug, j);
 }
index 9e24c1598c6af9e7c1b8c9e3d6152f45de19bf78..076f1280f9669f5e14362e3ad34fc033523c8bb1 100644 (file)
@@ -8,5 +8,5 @@
 
 fn main() {
     @0;
-    let r <- r(0);
+    let r = move r(0);
 }
\ No newline at end of file
index a29f83bf49a7fdb011cb9828763f625f5527b72b..5f89f4cd9850f8922584abd70554ff6a4ec73e0c 100644 (file)
@@ -8,6 +8,6 @@
 
 fn main() {
     @0;
-    let r <- r(0);
+    let r = move r(0);
     fail;
 }
\ No newline at end of file
index 7ef868dbac2a1f8e99a1b4006b8fc8052e27d129..0bcfba6c4a841bfa3014bf5a87dbcdc4a2c4c31f 100644 (file)
@@ -2,7 +2,7 @@
 
 fn bar(x: *~int) -> ~int {
     unsafe {
-        let y <- *x;
+        let y = move *x;
         return y;
     }
 }
index 2d1833c0736731e14df974a3dc0ef4d01743b685..2fb9afceb3d5875b4e86bc6a9121b0ba73c5640a 100644 (file)
@@ -5,7 +5,7 @@ fn add_int(x: &mut ints, v: int) {
     let mut values = ~[];
     x.values <-> values;
     values.push(v);
-    x.values <- values;
+    x.values <-> values;
 }
 
 fn iter_ints(x: &ints, f: fn(x: &int) -> bool) {
index 5039a7344df1501f897a4e4e2b1677a2e6e71be0..f881ed61671f93a8ea761ed59dc6337b8520ab12 100644 (file)
@@ -7,7 +7,7 @@ mod b1 {
         #[legacy_exports];
         //
         use a2::b1::*;
-        //         <-\
+        //         = move\
         export word_traveler; //           |
     }
     //           |
@@ -15,7 +15,7 @@ mod b2 {
         #[legacy_exports];
         //           |
         use a2::b2::*;
-        // <-\  -\   |
+        // = move\  -\   |
         export word_traveler; //   |   |   |
     } //   |   |   |
 }
@@ -30,7 +30,7 @@ mod a2 {
         #[legacy_exports];
         //   |   |   |
         use a1::b2::*;
-        //   | <-/  -/
+        //   | = move/  -/
         export word_traveler; //   |
     }
     //   |
index 5b317d9b26d92929b1bd0780d677f99fe14b97b5..ca03c0736a2d0e1fbb68531ca9adf3c0b1e9f305 100644 (file)
@@ -15,7 +15,7 @@ fn r(i: @mut int) -> r {
 fn test_box() {
     let i = @mut 0;
     {
-        let a <- @r(i);
+        let a = move @r(i);
     }
     assert *i == 1;
 }
@@ -23,7 +23,7 @@ fn test_box() {
 fn test_rec() {
     let i = @mut 0;
     {
-        let a <- {x: r(i)};
+        let a = move {x: r(i)};
     }
     assert *i == 1;
 }
@@ -35,7 +35,7 @@ enum t {
 
     let i = @mut 0;
     {
-        let a <- t0(r(i));
+        let a = move t0(r(i));
     }
     assert *i == 1;
 }
@@ -43,7 +43,7 @@ enum t {
 fn test_tup() {
     let i = @mut 0;
     {
-        let a <- (r(i), 0);
+        let a = move (r(i), 0);
     }
     assert *i == 1;
 }
@@ -51,7 +51,7 @@ fn test_tup() {
 fn test_unique() {
     let i = @mut 0;
     {
-        let a <- ~r(i);
+        let a = move ~r(i);
     }
     assert *i == 1;
 }
@@ -59,7 +59,7 @@ fn test_unique() {
 fn test_box_rec() {
     let i = @mut 0;
     {
-        let a <- @{
+        let a = move @{
             x: r(i)
         };
     }
index cda85fb166a95a9d14451e788a338e4e6e537aa8..8913ac3d304934ce642ce7e6d5089e135cf3f2eb 100644 (file)
@@ -24,9 +24,9 @@ fn filter<A,IA:iterable<A>>(self: IA, prd: fn@(A) -> bool, blk: fn(A)) {
 }
 
 fn foldl<A,B,IA:iterable<A>>(self: IA, +b0: B, blk: fn(B, A) -> B) -> B {
-    let mut b <- b0;
+    let mut b = move b0;
     do self.iter |a| {
-        b <- blk(b, a);
+        b = move blk(b, a);
     }
     move b
 }
index e91194b009a2b63d283b4c461b95234debd1e1db..7b8ff9b86b028de752ad17b24c4fdf3c1ebf784a 100644 (file)
@@ -63,7 +63,7 @@ fn send<T: Send>(-p: send_packet<T>, -payload: T) {
         let p = p.unwrap();
         let p = unsafe { uniquify(p) };
         assert (*p).payload.is_none();
-        (*p).payload <- Some(move payload);
+        (*p).payload = move Some(move payload);
         let old_state = swap_state_rel(&mut (*p).state, full);
         match old_state {
           empty => {
@@ -205,7 +205,7 @@ fn liberate_ping(-p: ping) -> pipes::send_packet<pong> unsafe {
         let addr : *pipes::send_packet<pong> = match p {
           ping(x) => { cast::transmute(ptr::addr_of(&x)) }
         };
-        let liberated_value <- *addr;
+        let liberated_value = move *addr;
         cast::forget(move p);
         move liberated_value
     }
@@ -214,7 +214,7 @@ fn liberate_pong(-p: pong) -> pipes::send_packet<ping> unsafe {
         let addr : *pipes::send_packet<ping> = match p {
           pong(x) => { cast::transmute(ptr::addr_of(&x)) }
         };
-        let liberated_value <- *addr;
+        let liberated_value = move *addr;
         cast::forget(move p);
         move liberated_value
     }
index ec37e14c47c1d616e5e231b4b15b8a40aa58e087..f485a8c6ec2ad49fedfbb1af9143d4b928e66b51 100644 (file)
@@ -2,7 +2,7 @@
 fn test(x: bool, foo: ~{x: int, y: int, z: int}) -> int {
     let bar = foo;
     let mut y: ~{x: int, y: int, z: int};
-    if x { y <- bar; } else { y = ~{x: 4, y: 5, z: 6}; }
+    if x { y = move bar; } else { y = ~{x: 4, y: 5, z: 6}; }
     return y.y;
 }
 
index c510626a08cb0deecee4fce93852dc2f45fdb9b1..6a1576dd878a9140fa4cb95a4e831dca87a06cfd 100644 (file)
@@ -1,7 +1,7 @@
 fn test(x: bool, foo: @{x: int, y: int, z: int}) -> int {
     let bar = foo;
     let mut y: @{x: int, y: int, z: int};
-    if x { y <- bar; } else { y = @{x: 4, y: 5, z: 6}; }
+    if x { y = move bar; } else { y = @{x: 4, y: 5, z: 6}; }
     return y.y;
 }
 
index 9d414aceb43d58b2802d022eec721e83eaad46e4..30e47677c948a3cbfc29fb3f52e28054b6886a30 100644 (file)
@@ -1,3 +1,3 @@
 
 
-fn main() { let x = ~{x: 1, y: 2, z: 3}; let y <- x; assert (y.y == 2); }
+fn main() { let x = ~{x: 1, y: 2, z: 3}; let y = move x; assert (y.y == 2); }
index 9309d718b15ec39902e2e5ce2839e04c18428699..58cd2e66612fbe015309e370bc4cedf0cb93a156 100644 (file)
@@ -1,3 +1,3 @@
 
 
-fn main() { let x = @{x: 1, y: 2, z: 3}; let y <- x; assert (y.y == 2); }
+fn main() { let x = @{x: 1, y: 2, z: 3}; let y = move x; assert (y.y == 2); }
index 5353ba191cd022308d879e258a727488a43633c1..08dbee5363704c21b4e73678d44e9d93657d2af6 100644 (file)
@@ -3,7 +3,7 @@
 fn test(x: bool, foo: ~{x: int, y: int, z: int}) -> int {
     let bar = foo;
     let mut y: ~{x: int, y: int, z: int};
-    if x { y <- bar; } else { y = ~{x: 4, y: 5, z: 6}; }
+    if x { y = move bar; } else { y = ~{x: 4, y: 5, z: 6}; }
     return y.y;
 }
 
index 784fa068d4d8b77f798a00f10dc1f5e4b908857c..26fd010b549b4fa33946fb6944901c44a890cee3 100644 (file)
@@ -3,7 +3,7 @@
 fn test(x: bool, foo: @{x: int, y: int, z: int}) -> int {
     let bar = foo;
     let mut y: @{x: int, y: int, z: int};
-    if x { y <- bar; } else { y = @{x: 4, y: 5, z: 6}; }
+    if x { y = move bar; } else { y = @{x: 4, y: 5, z: 6}; }
     return y.y;
 }
 
index 5bea6f8134d7700855ffc8e496a237dc0315873c..c4c84c8e10ca7e0bc2132a0711b2aa1146d9bff2 100644 (file)
@@ -2,9 +2,9 @@
 
 fn test(foo: ~{a: int, b: int, c: int}) -> ~{a: int, b: int, c: int} {
     let foo = foo;
-    let bar <- foo;
-    let baz <- bar;
-    let quux <- baz;
+    let bar = move foo;
+    let baz = move bar;
+    let quux = move baz;
     return quux;
 }
 
index 987d5e299d21768653bf63455d96529e882f1052..6eaa2bf2a44f100a5a70aa46edddc44b6016bdcc 100644 (file)
@@ -3,9 +3,9 @@
 
 fn test(foo: @{a: int, b: int, c: int}) -> @{a: int, b: int, c: int} {
     let foo = foo;
-    let bar <- foo;
-    let baz <- bar;
-    let quux <- baz;
+    let bar = move foo;
+    let baz = move bar;
+    let quux = move baz;
     return quux;
 }
 
index 3930d5371315465a146678568fe1a8432766800a..eef51c81cf4e62dcae63200501341ffc5c2a0737 100644 (file)
@@ -2,6 +2,6 @@ fn main() {
 
     let y: int = 42;
     let mut x: int;
-    x <- y;
+    x = move y;
     assert (x == 42);
 }
index e59634ad0897b905f58d09de9a19548205bcec09..7d7de6d120dce29bbe969c5c34ff9e5888776a64 100644 (file)
@@ -33,7 +33,7 @@
 )
 
 macro_rules! move_it (
-    { $x:expr } => { unsafe { let y <- *ptr::addr_of(&($x)); move y } }
+    { $x:expr } => { unsafe { let y = move *ptr::addr_of(&($x)); move y } }
 )
 
 fn switch<T: Send, U>(+endp: pipes::RecvPacket<T>,
index 3f3417fd703fd68b264535c300af20c649efa7de..2d3110c4518579fcf81533c6693bbfe39fcb8a3b 100644 (file)
@@ -15,7 +15,7 @@ fn shrinky_pointer(i: @@mut int) -> shrinky_pointer {
 
 fn main() {
     let my_total = @@mut 10;
-    { let pt <- shrinky_pointer(my_total); assert (pt.look_at() == 10); }
+    { let pt = move shrinky_pointer(my_total); assert (pt.look_at() == 10); }
     log(error, fmt!("my_total = %d", **my_total));
     assert (**my_total == 9);
 }
index e653e94ac7ac3b4b11e90bb8d3d88b85ae8531ae..f109775dd7b50faa1871368dba3e777bf4928526 100644 (file)
@@ -16,6 +16,6 @@ fn main() {
     let box = @mut 10;
     fn dec_box(&&i: @mut int) { *i -= 1; }
 
-    { let _i <- finish({val: box, fin: dec_box}); }
+    { let _i = move finish({val: box, fin: dec_box}); }
     assert (*box == 9);
 }
index 0261bbc3d5f9cfeb2d69427a8a3bca0e8e3d63ad..cde412a11436e77e28a9a6a91a9a3a55d2448e27 100644 (file)
@@ -1,4 +1,4 @@
 fn main() {
-    let i <- ~100;
+    let i = move ~100;
     assert *i == 100;
 }
\ No newline at end of file
index 9a8d418f757237668a01c5e3630711611ac02dc2..e4a46fb06afb23810864c2d937743d5ce3ba5e3d 100644 (file)
@@ -1,5 +1,5 @@
 fn main() {
     let i = ~100;
-    let j <- i;
+    let j = move i;
     assert *j == 100;
 }
\ No newline at end of file
index c4031f410065c098cc61aabb4ce515c4416d2457..8ef1af7bb10f81216904b8b8ae90d0edbdd5a80c 100644 (file)
@@ -1,6 +1,6 @@
 fn main() {
     let i = ~100;
     let j = ~200;
-    let j <- i;
+    let j = move i;
     assert *j == 100;
 }
\ No newline at end of file
index 677a28293729ec4e45bdfb9c49538bda496a8b6e..ca4409ac2aba0a3fd2182e1388130b66c0e72abb 100644 (file)
@@ -1,5 +1,5 @@
 fn main() {
     let mut i;
-    i <- ~100;
+    i = move ~100;
     assert *i == 100;
 }
\ No newline at end of file
index 5dde8eff44e60f08f16c41fcc43e687539f3c945..b81338a4d2560b5e9cfee78107d9fe65fbeb7125 100644 (file)
@@ -1,6 +1,6 @@
 fn main() {
     let i = ~100;
     let mut j;
-    j <- i;
+    j = move i;
     assert *j == 100;
 }
\ No newline at end of file
index 75fe81e5cd7dcd05ba1ea557cdd21a420df3e710..11cf1fe85f9de48cbdfab96063bd67e17ccb28f9 100644 (file)
@@ -3,7 +3,7 @@
 fn id(x: bool) -> bool { x }
 
 fn call_id() {
-    let c <- fail;
+    let c = move fail;
     id(c); //~ WARNING unreachable statement
 }
 
index d2b6b178407f583aa98bd02843738dd121862d4b..9d34e7a8dc68a524791a041e90d7d469cd0fe734 100644 (file)
@@ -3,7 +3,7 @@
 fn id(x: bool) -> bool { x }
 
 fn call_id() {
-    let c <- fail;
+    let c = move fail;
     id(c);
 }
 
index a602a2716026ec7b1d652dbfd0a4106870c9d41b..a03564d0801ca02f7afbc1a83226800626eecb40 100644 (file)
@@ -16,7 +16,7 @@ fn complainer(c: comm::Chan<bool>) -> complainer {
 }
 
 fn f(c: comm::Chan<bool>) {
-    let _c <- complainer(c);
+    let _c = move complainer(c);
     fail;
 }
 
index bd73825a4eb725e79d78cfaff031528bfd989d43..1470d7d7169dcb68c69c3d3f89541f4fcccba04c 100644 (file)
@@ -13,7 +13,7 @@ fn complainer(c: @int) -> complainer {
 }
 
 fn f() {
-    let c <- complainer(@0);
+    let c = move complainer(@0);
     fail;
 }
 
index f339e82666605fa6c6f08f4576b6c253ce1e4550..679ed99d1629c37a3a62e85355ed5a93ae356ed7 100644 (file)
@@ -40,7 +40,7 @@ fn zombiejesus() {
 fn notsure() {
     let mut _x;
     let mut _y = (_x = 0) == (_x = 0);
-    let mut _z = (_x <- 0) < (_x = 0);
+    let mut _z = (_x = move 0) < (_x = 0);
     let _a = (_x += 0) == (_x = 0);
     let _b = (_y <-> _z) == (_y <-> _z);
 }
@@ -63,7 +63,7 @@ fn angrydome() {
       break; }
 }
 
-fn evil_lincoln() { let evil <- debug!("lincoln"); }
+fn evil_lincoln() { let evil = move debug!("lincoln"); }
 
 fn main() {
     strange();
index 2293724739a1a4424439d40932210f763c1a34c4..83f49b960c0bccd6e38ae64a4d16554d1a9b3c6a 100644 (file)
@@ -5,7 +5,7 @@ fn main() {
     let mut x: int;
     while z < 50 {
         z += 1;
-        while false { x <- y; y = z; }
+        while false { x = move y; y = z; }
         log(debug, y);
     }
     assert (y == 42 && z == 50);