@@ -525,8 +525,7 @@ macro_rules! uint_impl {
525525
526526 // SAFETY: this is guaranteed to be safe by the caller.
527527 unsafe {
528- let lhs = self ;
529- intrinsics:: unchecked_add( lhs, rhs)
528+ intrinsics:: unchecked_add( self , rhs)
530529 }
531530 }
532531
@@ -675,8 +674,7 @@ macro_rules! uint_impl {
675674 ) ;
676675 // SAFETY: this is guaranteed to be safe by the caller.
677676 unsafe {
678- let lhs = self ;
679- intrinsics:: unchecked_sub( lhs, rhs)
677+ intrinsics:: unchecked_sub( self , rhs)
680678 }
681679 }
682680
@@ -763,8 +761,7 @@ macro_rules! uint_impl {
763761 ) ;
764762 // SAFETY: this is guaranteed to be safe by the caller.
765763 unsafe {
766- let lhs = self ;
767- intrinsics:: unchecked_mul( lhs, rhs)
764+ intrinsics:: unchecked_mul( self , rhs)
768765 }
769766 }
770767
@@ -1327,9 +1324,7 @@ macro_rules! uint_impl {
13271324 // SAFETY: this is guaranteed to be safe by the caller.
13281325 // Any legal shift amount is losslessly representable in the self type.
13291326 unsafe {
1330- let lhs = self ;
1331- let rhs = conv_rhs_for_unchecked_shift!( $SelfT, rhs) ;
1332- intrinsics:: unchecked_shl( lhs, rhs)
1327+ intrinsics:: unchecked_shl( self , conv_rhs_for_unchecked_shift!( $SelfT, rhs) )
13331328 }
13341329 }
13351330
@@ -1417,9 +1412,7 @@ macro_rules! uint_impl {
14171412 // SAFETY: this is guaranteed to be safe by the caller.
14181413 // Any legal shift amount is losslessly representable in the self type.
14191414 unsafe {
1420- let lhs = self ;
1421- let rhs = conv_rhs_for_unchecked_shift!( $SelfT, rhs) ;
1422- intrinsics:: unchecked_shr( lhs, rhs)
1415+ intrinsics:: unchecked_shr( self , conv_rhs_for_unchecked_shift!( $SelfT, rhs) )
14231416 }
14241417 }
14251418
@@ -1913,8 +1906,7 @@ macro_rules! uint_impl {
19131906 unsafe {
19141907 // FIXME: we can't optimize out the extra check here,
19151908 // so, we can't just call the method for now
1916- let rhs = conv_rhs_for_unchecked_shift!( $SelfT, rhs & ( Self :: BITS - 1 ) ) ;
1917- intrinsics:: unchecked_shl( self , rhs)
1909+ intrinsics:: unchecked_shl( self , conv_rhs_for_unchecked_shift!( $SelfT, rhs & ( Self :: BITS - 1 ) ) )
19181910 }
19191911 }
19201912
@@ -1949,8 +1941,7 @@ macro_rules! uint_impl {
19491941 unsafe {
19501942 // FIXME: we can't optimize out the extra check here,
19511943 // so, we can't just call the method for now
1952- let rhs = conv_rhs_for_unchecked_shift!( $SelfT, rhs & ( Self :: BITS - 1 ) ) ;
1953- intrinsics:: unchecked_shr( self , rhs)
1944+ intrinsics:: unchecked_shr( self , conv_rhs_for_unchecked_shift!( $SelfT, rhs & ( Self :: BITS - 1 ) ) )
19541945 }
19551946 }
19561947
0 commit comments