about summary refs log tree commit diff
path: root/src/libstd/num
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/libstd/num
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/libstd/num')
-rw-r--r--src/libstd/num/int_macros.rs3
-rw-r--r--src/libstd/num/uint_macros.rs3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/libstd/num/int_macros.rs b/src/libstd/num/int_macros.rs
index 74ec46ccfcd..845152f8552 100644
--- a/src/libstd/num/int_macros.rs
+++ b/src/libstd/num/int_macros.rs
@@ -400,7 +400,8 @@ impl Integer for $T {
     #[inline]
     fn gcd(&self, other: &$T) -> $T {
         // Use Euclid's algorithm
-        let mut (m, n) = (*self, *other);
+        let mut m = *self;
+        let mut n = *other;
         while m != 0 {
             let temp = m;
             m = n % temp;
diff --git a/src/libstd/num/uint_macros.rs b/src/libstd/num/uint_macros.rs
index 52f620f97ce..0dabe7fafa8 100644
--- a/src/libstd/num/uint_macros.rs
+++ b/src/libstd/num/uint_macros.rs
@@ -237,7 +237,8 @@ impl Integer for $T {
     #[inline]
     fn gcd(&self, other: &$T) -> $T {
         // Use Euclid's algorithm
-        let mut (m, n) = (*self, *other);
+        let mut m = *self;
+        let mut n = *other;
         while m != 0 {
             let temp = m;
             m = n % temp;