diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2015-09-03 15:19:08 +0530 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2015-09-03 17:46:35 +0530 |
| commit | a520568ae7dea13430c3d9ba5b3fb9596d863791 (patch) | |
| tree | 54294793c1a34fa29d757fbd7c741dbadd383ad5 /src/libcore/num | |
| parent | 1661947014fc2ecbbb7a30b1604499500dcf767e (diff) | |
Elide lifetimes in libcore
Diffstat (limited to 'src/libcore/num')
| -rw-r--r-- | src/libcore/num/flt2dec/bignum.rs | 10 | ||||
| -rw-r--r-- | src/libcore/num/flt2dec/strategy/dragon.rs | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/libcore/num/flt2dec/bignum.rs b/src/libcore/num/flt2dec/bignum.rs index ee2ffbffab6..091e9c889da 100644 --- a/src/libcore/num/flt2dec/bignum.rs +++ b/src/libcore/num/flt2dec/bignum.rs @@ -211,7 +211,7 @@ macro_rules! define_bignum { self } - pub fn add_small<'a>(&'a mut self, other: $ty) -> &'a mut $name { + pub fn add_small(&mut self, other: $ty) -> &mut $name { use num::flt2dec::bignum::FullOps; let (mut carry, v) = self.base[0].full_add(other, false); @@ -248,7 +248,7 @@ macro_rules! define_bignum { /// Multiplies itself by a digit-sized `other` and returns its own /// mutable reference. - pub fn mul_small<'a>(&'a mut self, other: $ty) -> &'a mut $name { + pub fn mul_small(&mut self, other: $ty) -> &mut $name { use num::flt2dec::bignum::FullOps; let mut sz = self.size; @@ -267,7 +267,7 @@ macro_rules! define_bignum { } /// Multiplies itself by `2^bits` and returns its own mutable reference. - pub fn mul_pow2<'a>(&'a mut self, bits: usize) -> &'a mut $name { + pub fn mul_pow2(&mut self, bits: usize) -> &mut $name { use mem; let digitbits = mem::size_of::<$ty>() * 8; @@ -308,7 +308,7 @@ macro_rules! define_bignum { } /// Multiplies itself by `5^e` and returns its own mutable reference. - pub fn mul_pow5<'a>(&'a mut self, mut e: usize) -> &'a mut $name { + pub fn mul_pow5(&mut self, mut e: usize) -> &mut $name { use mem; use num::flt2dec::bignum::SMALL_POW5; @@ -377,7 +377,7 @@ macro_rules! define_bignum { /// Divides itself by a digit-sized `other` and returns its own /// mutable reference *and* the remainder. - pub fn div_rem_small<'a>(&'a mut self, other: $ty) -> (&'a mut $name, $ty) { + pub fn div_rem_small(&mut self, other: $ty) -> (&mut $name, $ty) { use num::flt2dec::bignum::FullOps; assert!(other > 0); diff --git a/src/libcore/num/flt2dec/strategy/dragon.rs b/src/libcore/num/flt2dec/strategy/dragon.rs index ab610f28e9e..40aa2a527db 100644 --- a/src/libcore/num/flt2dec/strategy/dragon.rs +++ b/src/libcore/num/flt2dec/strategy/dragon.rs @@ -42,7 +42,7 @@ static POW10TO256: [Digit; 27] = 0xcc5573c0, 0x65f9ef17, 0x55bc28f2, 0x80dcc7f7, 0xf46eeddc, 0x5fdcefce, 0x553f7]; #[doc(hidden)] -pub fn mul_pow10<'a>(x: &'a mut Big, n: usize) -> &'a mut Big { +pub fn mul_pow10(x: &mut Big, n: usize) -> &mut Big { debug_assert!(n < 512); if n & 7 != 0 { x.mul_small(POW10[n & 7]); } if n & 8 != 0 { x.mul_small(POW10[8]); } @@ -54,7 +54,7 @@ pub fn mul_pow10<'a>(x: &'a mut Big, n: usize) -> &'a mut Big { x } -fn div_2pow10<'a>(x: &'a mut Big, mut n: usize) -> &'a mut Big { +fn div_2pow10(x: &mut Big, mut n: usize) -> &mut Big { let largest = POW10.len() - 1; while n > largest { x.div_rem_small(POW10[largest]); |
