@@ -634,8 +634,8 @@ $EndFeature, "
634
634
}
635
635
636
636
doc_comment! {
637
- concat!( "Checked Euclidean division. Computes `self.div_euc(rhs)`, returning `None` if `rhs == 0`
638
- or the division results in overflow.
637
+ concat!( "Checked Euclidean division. Computes `self.div_euc(rhs)`,
638
+ returning `None` if `rhs == 0` or the division results in overflow.
639
639
640
640
# Examples
641
641
@@ -1047,8 +1047,8 @@ $EndFeature, "
1047
1047
}
1048
1048
1049
1049
doc_comment! {
1050
- concat!( "Wrapping Euclidean division. Computes `self.div_euc(rhs)`, wrapping around at the
1051
- boundary of the type.
1050
+ concat!( "Wrapping Euclidean division. Computes `self.div_euc(rhs)`,
1051
+ wrapping around at the boundary of the type.
1052
1052
1053
1053
The only case where such wrapping can occur is when one divides `MIN / -1` on a signed type (where
1054
1054
`MIN` is the negative minimal value for the type); this is equivalent to `-MIN`, a positive value
@@ -1462,7 +1462,7 @@ $EndFeature, "
1462
1462
1463
1463
1464
1464
doc_comment! {
1465
- concat!( "Calculates the modulo of Euclidean divsion `self.mod_euc(rhs)`.
1465
+ concat!( "Calculates the remainder `self.mod_euc(rhs)` by Euclidean division .
1466
1466
1467
1467
Returns a tuple of the remainder after dividing along with a boolean indicating whether an
1468
1468
arithmetic overflow would occur. If an overflow would occur then 0 is returned.
@@ -1691,8 +1691,8 @@ $EndFeature, "
1691
1691
doc_comment! {
1692
1692
concat!( "Calculates the quotient of Euclidean division of `self` by `rhs`.
1693
1693
1694
- This computes the integer n such that `self = n * rhs + self.mod_euc(rhs)`.
1695
- In other words, the result is `self / rhs` rounded to the integer n
1694
+ This computes the integer `n` such that `self = n * rhs + self.mod_euc(rhs)`.
1695
+ In other words, the result is `self / rhs` rounded to the integer `n`
1696
1696
such that `self >= n * rhs`.
1697
1697
1698
1698
# Panics
@@ -1727,7 +1727,7 @@ $EndFeature, "
1727
1727
1728
1728
1729
1729
doc_comment! {
1730
- concat!( "Calculates the modulo `self mod rhs` by Euclidean division.
1730
+ concat!( "Calculates the remainder `self mod rhs` by Euclidean division.
1731
1731
1732
1732
In particular, the result `n` satisfies `0 <= n < rhs.abs()`.
1733
1733
@@ -2720,7 +2720,7 @@ Basic usage:
2720
2720
#[ unstable( feature = "euclidean_division" , issue = "49048" ) ]
2721
2721
#[ inline]
2722
2722
pub fn wrapping_div_euc( self , rhs: Self ) -> Self {
2723
- self . div_euc ( rhs)
2723
+ self / rhs
2724
2724
}
2725
2725
}
2726
2726
@@ -3018,7 +3018,8 @@ This function will panic if `rhs` is 0.
3018
3018
Basic usage
3019
3019
3020
3020
```
3021
- " , $Feature, "assert_eq!(5" , stringify!( $SelfT) , ".overflowing_div_euc(2), (2, false));" , $EndFeature, "
3021
+ " , $Feature, "assert_eq!(5" , stringify!( $SelfT) , ".overflowing_div_euc(2), (2, false));" ,
3022
+ $EndFeature, "
3022
3023
```" ) ,
3023
3024
#[ inline]
3024
3025
#[ unstable( feature = "euclidean_division" , issue = "49048" ) ]
@@ -3054,7 +3055,7 @@ Basic usage
3054
3055
}
3055
3056
3056
3057
doc_comment! {
3057
- concat!( "Calculates the modulo of Euclidean division of `self.mod_euc(rhs)`.
3058
+ concat!( "Calculates the remainder `self.mod_euc(rhs)` by Euclidean division .
3058
3059
3059
3060
Returns a tuple of the modulo after dividing along with a boolean
3060
3061
indicating whether an arithmetic overflow would occur. Note that for
@@ -3070,7 +3071,8 @@ This function will panic if `rhs` is 0.
3070
3071
Basic usage
3071
3072
3072
3073
```
3073
- " , $Feature, "assert_eq!(5" , stringify!( $SelfT) , ".overflowing_mod_euc(2), (1, false));" , $EndFeature, "
3074
+ " , $Feature, "assert_eq!(5" , stringify!( $SelfT) , ".overflowing_mod_euc(2), (1, false));" ,
3075
+ $EndFeature, "
3074
3076
```" ) ,
3075
3077
#[ inline]
3076
3078
#[ unstable( feature = "euclidean_division" , issue = "49048" ) ]
@@ -3259,7 +3261,7 @@ $EndFeature, "
3259
3261
3260
3262
3261
3263
doc_comment! {
3262
- concat!( "Calculates the Euclidean modulo `self mod rhs`.
3264
+ concat!( "Calculates the remainder `self mod rhs` by Euclidean division .
3263
3265
3264
3266
For unsigned types, this is just the same as `self % rhs`.
3265
3267
0 commit comments