Skip to content

Commit fd2aed8

Browse files
committed
include more basics in DInt
1 parent fac05ed commit fd2aed8

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

libm/src/math/support/int_traits.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,14 @@ int_impl!(i128, u128);
296296

297297
/// Trait for integers twice the bit width of another integer. This is implemented for all
298298
/// primitives except for `u8`, because there is not a smaller primitive.
299-
pub trait DInt: MinInt {
299+
pub trait DInt:
300+
MinInt
301+
+ core::ops::Add<Output = Self>
302+
+ core::ops::Sub<Output = Self>
303+
+ core::ops::Shl<u32, Output = Self>
304+
+ core::ops::Shr<u32, Output = Self>
305+
+ Ord
306+
{
300307
/// Integer that is half the bit width of the integer this trait is implemented for
301308
type H: HInt<D = Self>;
302309

0 commit comments

Comments
 (0)