Made BaseNum to be a blanket implementation.

This commit is contained in:
Delma 2016-11-28 22:29:09 +02:00
parent e0fc89ffc6
commit 23f57dd133
1 changed files with 14 additions and 18 deletions

View File

@ -424,18 +424,14 @@ macro_rules! impl_base_float(
}
);
impl BaseNum for i8 { }
impl BaseNum for i16 { }
impl BaseNum for i32 { }
impl BaseNum for i64 { }
impl BaseNum for isize { }
impl BaseNum for u8 { }
impl BaseNum for u16 { }
impl BaseNum for u32 { }
impl BaseNum for u64 { }
impl BaseNum for usize { }
impl BaseNum for f32 { }
impl BaseNum for f64 { }
impl<T: Copy + Zero + One +
Add<T, Output = T> + Sub<T, Output = T> +
Mul<T, Output = T> + Div<T, Output = T> +
Rem<T, Output = T> +
AddAssign<T> + SubAssign<T> +
MulAssign<T> + DivAssign<T> +
RemAssign<T> +
PartialEq + Absolute<T> + Axpy<T>> BaseNum for T {}
impl_base_float!(f32);
impl_base_float!(f64);