@@ -56,15 +56,15 @@ macro_rules! impl_schoolbook_multiplication {
56
56
57
57
impl < const LIMBS : usize > Uint < LIMBS > {
58
58
/// Multiply `self` by `rhs`, returning a concatenated "wide" result.
59
- pub fn widening_mul < const RHS_LIMBS : usize > (
59
+ pub const fn widening_mul < const RHS_LIMBS : usize , const WIDE_LIMBS : usize > (
60
60
& self ,
61
61
rhs : & Uint < RHS_LIMBS > ,
62
- ) -> < Uint < RHS_LIMBS > as ConcatMixed < Self > > :: MixedOutput
62
+ ) -> Uint < WIDE_LIMBS >
63
63
where
64
- Uint < RHS_LIMBS > : ConcatMixed < Self > ,
64
+ Uint < RHS_LIMBS > : ConcatMixed < Self , MixedOutput = Uint < WIDE_LIMBS > > ,
65
65
{
66
66
let ( lo, hi) = self . split_mul ( rhs) ;
67
- hi . concat_mixed ( & lo)
67
+ concat_mixed ( & lo, & hi )
68
68
}
69
69
70
70
/// Compute "wide" multiplication as a 2-tuple containing the `(lo, hi)` components of the product, whose sizes
@@ -239,9 +239,10 @@ impl<const LIMBS: usize> MulAssign<&Checked<Uint<LIMBS>>> for Checked<Uint<LIMBS
239
239
}
240
240
}
241
241
242
- impl < const LIMBS : usize , const RHS_LIMBS : usize > WideningMul < Uint < RHS_LIMBS > > for Uint < LIMBS >
242
+ impl < const LIMBS : usize , const RHS_LIMBS : usize , const WIDE_LIMBS : usize >
243
+ WideningMul < Uint < RHS_LIMBS > > for Uint < LIMBS >
243
244
where
244
- Uint < RHS_LIMBS > : ConcatMixed < Self > ,
245
+ Uint < RHS_LIMBS > : ConcatMixed < Self , MixedOutput = Uint < WIDE_LIMBS > > ,
245
246
{
246
247
type Output = <Uint < RHS_LIMBS > as ConcatMixed < Self > >:: MixedOutput ;
247
248
@@ -251,9 +252,10 @@ where
251
252
}
252
253
}
253
254
254
- impl < const LIMBS : usize , const RHS_LIMBS : usize > WideningMul < & Uint < RHS_LIMBS > > for Uint < LIMBS >
255
+ impl < const LIMBS : usize , const RHS_LIMBS : usize , const WIDE_LIMBS : usize >
256
+ WideningMul < & Uint < RHS_LIMBS > > for Uint < LIMBS >
255
257
where
256
- Uint < RHS_LIMBS > : ConcatMixed < Self > ,
258
+ Uint < RHS_LIMBS > : ConcatMixed < Self , MixedOutput = Uint < WIDE_LIMBS > > ,
257
259
{
258
260
type Output = <Uint < RHS_LIMBS > as ConcatMixed < Self > >:: MixedOutput ;
259
261
0 commit comments