diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2013-06-06 18:54:14 -0700 |
|---|---|---|
| committer | Corey Richardson <corey@octayn.net> | 2013-06-28 10:44:15 -0400 |
| commit | f9b54541ee2bbab1d81b14252f4d4172e10fd748 (patch) | |
| tree | 05d98a9a5d6bb84f8c48fc646d898ec6ec6eb8d4 /src/libextra/num | |
| parent | 1c0aa7848103b5018473df851bc115d3e5585185 (diff) | |
librustc: Disallow "mut" from distributing over bindings.
This is the backwards-incompatible part of per-binding-site "mut".
Diffstat (limited to 'src/libextra/num')
| -rw-r--r-- | src/libextra/num/bigint.rs | 8 |
1 files changed, 6 insertions, 2 deletions
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; |
