summary refs log tree commit diff
path: root/src/libextra
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2013-06-06 18:54:14 -0700
committerCorey Richardson <corey@octayn.net>2013-06-28 10:44:15 -0400
commitf9b54541ee2bbab1d81b14252f4d4172e10fd748 (patch)
tree05d98a9a5d6bb84f8c48fc646d898ec6ec6eb8d4 /src/libextra
parent1c0aa7848103b5018473df851bc115d3e5585185 (diff)
downloadrust-f9b54541ee2bbab1d81b14252f4d4172e10fd748.tar.gz
rust-f9b54541ee2bbab1d81b14252f4d4172e10fd748.zip
librustc: Disallow "mut" from distributing over bindings.
This is the backwards-incompatible part of per-binding-site "mut".
Diffstat (limited to 'src/libextra')
-rw-r--r--src/libextra/md4.rs3
-rw-r--r--src/libextra/net_url.rs4
-rw-r--r--src/libextra/num/bigint.rs8
-rw-r--r--src/libextra/timer.rs4
4 files changed, 14 insertions, 5 deletions
diff --git a/src/libextra/md4.rs b/src/libextra/md4.rs
index 6c972a313c4..2534fedd961 100644
--- a/src/libextra/md4.rs
+++ b/src/libextra/md4.rs
@@ -59,7 +59,8 @@ pub fn md4(msg: &[u8]) -> Quad {
     while i < e {
         let (aa, bb, cc, dd) = (a, b, c, d);
 
-        let mut (j, base) = (0u, i);
+        let mut j = 0u;
+        let mut base = i;
         while j < 16u {
             x[j] = (msg[base] as u32) + (msg[base + 1u] as u32 << 8u32) +
                 (msg[base + 2u] as u32 << 16u32) +
diff --git a/src/libextra/net_url.rs b/src/libextra/net_url.rs
index 5d3d31fdec4..f9eaa2bf02d 100644
--- a/src/libextra/net_url.rs
+++ b/src/libextra/net_url.rs
@@ -415,7 +415,9 @@ fn get_authority(rawurl: &str) ->
     let mut port = None;
 
     let mut colon_count = 0;
-    let mut (pos, begin, end) = (0, 2, len);
+    let mut pos = 0;
+    let mut begin = 2;
+    let mut end = len;
 
     for rawurl.iter().enumerate().advance |(i,c)| {
         if i < 2 { loop; } // ignore the leading //
diff --git a/src/libextra/num/bigint.rs b/src/libextra/num/bigint.rs
index 1ac913e8a00..c2702ac70b1 100644
--- a/src/libextra/num/bigint.rs
+++ b/src/libextra/num/bigint.rs
@@ -380,7 +380,10 @@ impl Integer for BigUint {
             let mut d = Zero::zero::<BigUint>();
             let mut n = 1;
             while m >= b {
-                let mut (d0, d_unit, b_unit) = div_estimate(&m, &b, n);
+                let (d0, d_unit, b_unit) = div_estimate(&m, &b, n);
+                let mut d0 = d0;
+                let mut d_unit = d_unit;
+                let mut b_unit = b_unit;
                 let mut prod = b * d0;
                 while prod > m {
                     // FIXME(#6050): overloaded operators force moves with generic types
@@ -442,7 +445,8 @@ impl Integer for BigUint {
 
     fn gcd(&self, other: &BigUint) -> BigUint {
         // Use Euclid's algorithm
-        let mut (m, n) = (copy *self, copy *other);
+        let mut m = copy *self;
+        let mut n = copy *other;
         while !m.is_zero() {
             let temp = m;
             m = n % temp;
diff --git a/src/libextra/timer.rs b/src/libextra/timer.rs
index 5a622ddfa0d..79451db8b17 100644
--- a/src/libextra/timer.rs
+++ b/src/libextra/timer.rs
@@ -123,7 +123,9 @@ pub fn recv_timeout<T:Copy + Send>(iotask: &IoTask,
                                    msecs: uint,
                                    wait_po: &Port<T>)
                                    -> Option<T> {
-    let mut (timeout_po, timeout_ch) = stream::<()>();
+    let (timeout_po, timeout_ch) = stream::<()>();
+    let mut timeout_po = timeout_po;
+    let mut timeout_ch = timeout_ch;
     delayed_send(iotask, msecs, &timeout_ch, ());
 
     // XXX: Workaround due to ports and channels not being &mut. They should