@@ -2025,17 +2025,17 @@ macro_rules! int_impl {
2025
2025
#[ doc = concat!( "let a: " , stringify!( $SelfT) , " = 8;" ) ]
2026
2026
/// let b = 3;
2027
2027
///
2028
- /// assert_eq!(a.unstable_div_floor (b), 2);
2029
- /// assert_eq!(a.unstable_div_floor (-b), -3);
2030
- /// assert_eq!((-a).unstable_div_floor (b), -3);
2031
- /// assert_eq!((-a).unstable_div_floor (-b), 2);
2028
+ /// assert_eq!(a.div_floor (b), 2);
2029
+ /// assert_eq!(a.div_floor (-b), -3);
2030
+ /// assert_eq!((-a).div_floor (b), -3);
2031
+ /// assert_eq!((-a).div_floor (-b), 2);
2032
2032
/// ```
2033
2033
#[ unstable( feature = "int_roundings" , issue = "88581" ) ]
2034
2034
#[ must_use = "this returns the result of the operation, \
2035
2035
without modifying the original"]
2036
2036
#[ inline]
2037
2037
#[ rustc_inherit_overflow_checks]
2038
- pub const fn unstable_div_floor ( self , rhs: Self ) -> Self {
2038
+ pub const fn div_floor ( self , rhs: Self ) -> Self {
2039
2039
let d = self / rhs;
2040
2040
let r = self % rhs;
2041
2041
if ( r > 0 && rhs < 0 ) || ( r < 0 && rhs > 0 ) {
@@ -2060,17 +2060,17 @@ macro_rules! int_impl {
2060
2060
#[ doc = concat!( "let a: " , stringify!( $SelfT) , " = 8;" ) ]
2061
2061
/// let b = 3;
2062
2062
///
2063
- /// assert_eq!(a.unstable_div_ceil (b), 3);
2064
- /// assert_eq!(a.unstable_div_ceil (-b), -2);
2065
- /// assert_eq!((-a).unstable_div_ceil (b), -2);
2066
- /// assert_eq!((-a).unstable_div_ceil (-b), 3);
2063
+ /// assert_eq!(a.div_ceil (b), 3);
2064
+ /// assert_eq!(a.div_ceil (-b), -2);
2065
+ /// assert_eq!((-a).div_ceil (b), -2);
2066
+ /// assert_eq!((-a).div_ceil (-b), 3);
2067
2067
/// ```
2068
2068
#[ unstable( feature = "int_roundings" , issue = "88581" ) ]
2069
2069
#[ must_use = "this returns the result of the operation, \
2070
2070
without modifying the original"]
2071
2071
#[ inline]
2072
2072
#[ rustc_inherit_overflow_checks]
2073
- pub const fn unstable_div_ceil ( self , rhs: Self ) -> Self {
2073
+ pub const fn div_ceil ( self , rhs: Self ) -> Self {
2074
2074
let d = self / rhs;
2075
2075
let r = self % rhs;
2076
2076
if ( r > 0 && rhs > 0 ) || ( r < 0 && rhs < 0 ) {
@@ -2095,21 +2095,21 @@ macro_rules! int_impl {
2095
2095
///
2096
2096
/// ```
2097
2097
/// #![feature(int_roundings)]
2098
- #[ doc = concat!( "assert_eq!(16_" , stringify!( $SelfT) , ".unstable_next_multiple_of (8), 16);" ) ]
2099
- #[ doc = concat!( "assert_eq!(23_" , stringify!( $SelfT) , ".unstable_next_multiple_of (8), 24);" ) ]
2100
- #[ doc = concat!( "assert_eq!(16_" , stringify!( $SelfT) , ".unstable_next_multiple_of (-8), 16);" ) ]
2101
- #[ doc = concat!( "assert_eq!(23_" , stringify!( $SelfT) , ".unstable_next_multiple_of (-8), 16);" ) ]
2102
- #[ doc = concat!( "assert_eq!((-16_" , stringify!( $SelfT) , ").unstable_next_multiple_of (8), -16);" ) ]
2103
- #[ doc = concat!( "assert_eq!((-23_" , stringify!( $SelfT) , ").unstable_next_multiple_of (8), -16);" ) ]
2104
- #[ doc = concat!( "assert_eq!((-16_" , stringify!( $SelfT) , ").unstable_next_multiple_of (-8), -16);" ) ]
2105
- #[ doc = concat!( "assert_eq!((-23_" , stringify!( $SelfT) , ").unstable_next_multiple_of (-8), -24);" ) ]
2098
+ #[ doc = concat!( "assert_eq!(16_" , stringify!( $SelfT) , ".next_multiple_of (8), 16);" ) ]
2099
+ #[ doc = concat!( "assert_eq!(23_" , stringify!( $SelfT) , ".next_multiple_of (8), 24);" ) ]
2100
+ #[ doc = concat!( "assert_eq!(16_" , stringify!( $SelfT) , ".next_multiple_of (-8), 16);" ) ]
2101
+ #[ doc = concat!( "assert_eq!(23_" , stringify!( $SelfT) , ".next_multiple_of (-8), 16);" ) ]
2102
+ #[ doc = concat!( "assert_eq!((-16_" , stringify!( $SelfT) , ").next_multiple_of (8), -16);" ) ]
2103
+ #[ doc = concat!( "assert_eq!((-23_" , stringify!( $SelfT) , ").next_multiple_of (8), -16);" ) ]
2104
+ #[ doc = concat!( "assert_eq!((-16_" , stringify!( $SelfT) , ").next_multiple_of (-8), -16);" ) ]
2105
+ #[ doc = concat!( "assert_eq!((-23_" , stringify!( $SelfT) , ").next_multiple_of (-8), -24);" ) ]
2106
2106
/// ```
2107
2107
#[ unstable( feature = "int_roundings" , issue = "88581" ) ]
2108
2108
#[ must_use = "this returns the result of the operation, \
2109
2109
without modifying the original"]
2110
2110
#[ inline]
2111
2111
#[ rustc_inherit_overflow_checks]
2112
- pub const fn unstable_next_multiple_of ( self , rhs: Self ) -> Self {
2112
+ pub const fn next_multiple_of ( self , rhs: Self ) -> Self {
2113
2113
// This would otherwise fail when calculating `r` when self == T::MIN.
2114
2114
if rhs == -1 {
2115
2115
return self ;
0 commit comments