From f9b54541ee2bbab1d81b14252f4d4172e10fd748 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Thu, 6 Jun 2013 18:54:14 -0700 Subject: librustc: Disallow "mut" from distributing over bindings. This is the backwards-incompatible part of per-binding-site "mut". --- src/libextra/num/bigint.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/libextra/num') 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::(); 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; -- cgit 1.4.1-3-g733a5