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