Make sure PrimInt is actually implemented for the primitive types.

This commit is contained in:
kennytm 2015-04-05 02:28:30 +08:00
parent 24d2f15ccf
commit fd86a2c531
1 changed files with 2 additions and 8 deletions

View File

@ -677,14 +677,6 @@ pub trait PrimInt
macro_rules! prim_int_impl {
($($T:ty)*) => ($(
impl PrimInt for $T {
fn min_value() -> Self {
<$T>::min_value()
}
fn max_value() -> Self {
<$T>::max_value()
}
fn count_ones(self) -> u32 {
<$T>::count_ones(self)
}
@ -736,6 +728,8 @@ macro_rules! prim_int_impl {
)*)
}
prim_int_impl!(u8 u16 u32 u64 usize i8 i16 i32 i64 isize);
/// A generic trait for converting a value to a number.
pub trait ToPrimitive {
/// Converts the value of `self` to an `isize`.