@@ -525,8 +525,7 @@ macro_rules! uint_impl {
525
525
526
526
// SAFETY: this is guaranteed to be safe by the caller.
527
527
unsafe {
528
- let lhs = self ;
529
- intrinsics:: unchecked_add( lhs, rhs)
528
+ intrinsics:: unchecked_add( self , rhs)
530
529
}
531
530
}
532
531
@@ -675,8 +674,7 @@ macro_rules! uint_impl {
675
674
) ;
676
675
// SAFETY: this is guaranteed to be safe by the caller.
677
676
unsafe {
678
- let lhs = self ;
679
- intrinsics:: unchecked_sub( lhs, rhs)
677
+ intrinsics:: unchecked_sub( self , rhs)
680
678
}
681
679
}
682
680
@@ -763,8 +761,7 @@ macro_rules! uint_impl {
763
761
) ;
764
762
// SAFETY: this is guaranteed to be safe by the caller.
765
763
unsafe {
766
- let lhs = self ;
767
- intrinsics:: unchecked_mul( lhs, rhs)
764
+ intrinsics:: unchecked_mul( self , rhs)
768
765
}
769
766
}
770
767
@@ -1327,9 +1324,7 @@ macro_rules! uint_impl {
1327
1324
// SAFETY: this is guaranteed to be safe by the caller.
1328
1325
// Any legal shift amount is losslessly representable in the self type.
1329
1326
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) )
1333
1328
}
1334
1329
}
1335
1330
@@ -1417,9 +1412,7 @@ macro_rules! uint_impl {
1417
1412
// SAFETY: this is guaranteed to be safe by the caller.
1418
1413
// Any legal shift amount is losslessly representable in the self type.
1419
1414
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) )
1423
1416
}
1424
1417
}
1425
1418
@@ -1913,8 +1906,7 @@ macro_rules! uint_impl {
1913
1906
unsafe {
1914
1907
// FIXME: we can't optimize out the extra check here,
1915
1908
// 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 ) ) )
1918
1910
}
1919
1911
}
1920
1912
@@ -1949,8 +1941,7 @@ macro_rules! uint_impl {
1949
1941
unsafe {
1950
1942
// FIXME: we can't optimize out the extra check here,
1951
1943
// 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 ) ) )
1954
1945
}
1955
1946
}
1956
1947
0 commit comments