diff options
Diffstat (limited to 'src/libcore/num')
| -rw-r--r-- | src/libcore/num/int-template.rs | 2 | ||||
| -rw-r--r-- | src/libcore/num/num.rs | 2 | ||||
| -rw-r--r-- | src/libcore/num/uint-template.rs | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/libcore/num/int-template.rs b/src/libcore/num/int-template.rs index cb29b9e4486..e322e5edeb9 100644 --- a/src/libcore/num/int-template.rs +++ b/src/libcore/num/int-template.rs @@ -279,7 +279,7 @@ impl Signed for T { fn is_negative(&self) -> bool { *self < 0 } } -impl Natural for T { +impl Integer for T { /** * Floored integer division * diff --git a/src/libcore/num/num.rs b/src/libcore/num/num.rs index 8304179c346..1c3c699603b 100644 --- a/src/libcore/num/num.rs +++ b/src/libcore/num/num.rs @@ -61,7 +61,7 @@ pub fn abs<T:Ord + Zero + Neg<T>>(v: T) -> T { if v < Zero::zero() { v.neg() } else { v } } -pub trait Natural: Num +pub trait Integer: Num + Ord + Quot<Self,Self> + Rem<Self,Self> { diff --git a/src/libcore/num/uint-template.rs b/src/libcore/num/uint-template.rs index 2ee64d4e4ea..69483f33e52 100644 --- a/src/libcore/num/uint-template.rs +++ b/src/libcore/num/uint-template.rs @@ -176,7 +176,7 @@ impl Neg<T> for T { impl Unsigned for T {} -impl Natural for T { +impl Integer for T { /// Unsigned integer division. Returns the same result as `quot` (`/`). #[inline(always)] fn div(&self, other: T) -> T { *self / other } |
