more supertraits for traits::Fixed: PartialOrd<primitives>

This commit is contained in:
Trevor Spiteri 2019-08-06 23:23:16 +02:00
parent 7ead73794c
commit 75ec7dd013
2 changed files with 7 additions and 0 deletions

View File

@ -396,11 +396,13 @@ macro_rules! fixed_cmp_all {
fixed_cmp_int! { $Fix($NBits), i32 }
fixed_cmp_int! { $Fix($NBits), i64 }
fixed_cmp_int! { $Fix($NBits), i128 }
fixed_cmp_int! { $Fix($NBits), isize }
fixed_cmp_int! { $Fix($NBits), u8 }
fixed_cmp_int! { $Fix($NBits), u16 }
fixed_cmp_int! { $Fix($NBits), u32 }
fixed_cmp_int! { $Fix($NBits), u64 }
fixed_cmp_int! { $Fix($NBits), u128 }
fixed_cmp_int! { $Fix($NBits), usize }
#[cfg(feature = "f16")]
fixed_cmp_float! { $Fix($NBits), f16 }
fixed_cmp_float! { $Fix($NBits), f32 }

View File

@ -45,6 +45,11 @@ where
Self: Not<Output = Self> + Shl<u32, Output = Self> + Shr<u32, Output = Self>,
Self: AddAssign + SubAssign + MulAssign + DivAssign,
Self: BitAndAssign + BitOrAssign + BitXorAssign + ShlAssign<u32> + ShrAssign<u32>,
Self: PartialOrd<i8> + PartialOrd<i16> + PartialOrd<i32>,
Self: PartialOrd<i64> + PartialOrd<i128> + PartialOrd<isize>,
Self: PartialOrd<u8> + PartialOrd<u16> + PartialOrd<u32>,
Self: PartialOrd<u64> + PartialOrd<u128> + PartialOrd<usize>,
Self: PartialOrd<f32> + PartialOrd<f64>,
{
/// The primitive integer underlying type.
type Bits;