@@ -992,10 +992,10 @@ macro_rules! int_impl {
992992 ///
993993 /// ```
994994 /// #![feature(exact_div)]
995- #[ doc = concat!( "assert_eq!((" , stringify!( $SelfT) , "::MIN + 1).checked_exact_div (-1), Some(" , stringify!( $Max) , "));" ) ]
996- #[ doc = concat!( "assert_eq!((-5" , stringify!( $SelfT) , ").checked_exact_div (2), None);" ) ]
997- #[ doc = concat!( "assert_eq!(" , stringify!( $SelfT) , "::MIN.checked_exact_div (-1), None);" ) ]
998- #[ doc = concat!( "assert_eq!((1" , stringify!( $SelfT) , ").checked_exact_div (0), None);" ) ]
995+ #[ doc = concat!( "assert_eq!((" , stringify!( $SelfT) , "::MIN + 1).checked_div_exact (-1), Some(" , stringify!( $Max) , "));" ) ]
996+ #[ doc = concat!( "assert_eq!((-5" , stringify!( $SelfT) , ").checked_div_exact (2), None);" ) ]
997+ #[ doc = concat!( "assert_eq!(" , stringify!( $SelfT) , "::MIN.checked_div_exact (-1), None);" ) ]
998+ #[ doc = concat!( "assert_eq!((1" , stringify!( $SelfT) , ").checked_div_exact (0), None);" ) ]
999999 /// ```
10001000 #[ unstable(
10011001 feature = "exact_div" ,
@@ -1004,7 +1004,7 @@ macro_rules! int_impl {
10041004 #[ must_use = "this returns the result of the operation, \
10051005 without modifying the original"]
10061006 #[ inline]
1007- pub const fn checked_exact_div ( self , rhs: Self ) -> Option <Self > {
1007+ pub const fn checked_div_exact ( self , rhs: Self ) -> Option <Self > {
10081008 if intrinsics:: unlikely( rhs == 0 || ( ( self == Self :: MIN ) && ( rhs == -1 ) ) ) {
10091009 None
10101010 } else {
@@ -1034,18 +1034,18 @@ macro_rules! int_impl {
10341034 ///
10351035 /// ```
10361036 /// #![feature(exact_div)]
1037- #[ doc = concat!( "assert_eq!(64" , stringify!( $SelfT) , ".exact_div (2), Some(32));" ) ]
1038- #[ doc = concat!( "assert_eq!(64" , stringify!( $SelfT) , ".exact_div (32), Some(2));" ) ]
1039- #[ doc = concat!( "assert_eq!((" , stringify!( $SelfT) , "::MIN + 1).exact_div (-1), Some(" , stringify!( $Max) , "));" ) ]
1040- #[ doc = concat!( "assert_eq!(65" , stringify!( $SelfT) , ".exact_div (2), None);" ) ]
1037+ #[ doc = concat!( "assert_eq!(64" , stringify!( $SelfT) , ".div_exact (2), Some(32));" ) ]
1038+ #[ doc = concat!( "assert_eq!(64" , stringify!( $SelfT) , ".div_exact (32), Some(2));" ) ]
1039+ #[ doc = concat!( "assert_eq!((" , stringify!( $SelfT) , "::MIN + 1).div_exact (-1), Some(" , stringify!( $Max) , "));" ) ]
1040+ #[ doc = concat!( "assert_eq!(65" , stringify!( $SelfT) , ".div_exact (2), None);" ) ]
10411041 /// ```
10421042 /// ```should_panic
10431043 /// #![feature(exact_div)]
1044- #[ doc = concat!( "let _ = 64" , stringify!( $SelfT) , ".exact_div (0);" ) ]
1044+ #[ doc = concat!( "let _ = 64" , stringify!( $SelfT) , ".div_exact (0);" ) ]
10451045 /// ```
10461046 /// ```should_panic
10471047 /// #![feature(exact_div)]
1048- #[ doc = concat!( "let _ = " , stringify!( $SelfT) , "::MIN.exact_div (-1);" ) ]
1048+ #[ doc = concat!( "let _ = " , stringify!( $SelfT) , "::MIN.div_exact (-1);" ) ]
10491049 /// ```
10501050 #[ unstable(
10511051 feature = "exact_div" ,
@@ -1055,7 +1055,7 @@ macro_rules! int_impl {
10551055 without modifying the original"]
10561056 #[ inline]
10571057 #[ rustc_inherit_overflow_checks]
1058- pub const fn exact_div ( self , rhs: Self ) -> Option <Self > {
1058+ pub const fn div_exact ( self , rhs: Self ) -> Option <Self > {
10591059 if self % rhs != 0 {
10601060 None
10611061 } else {
@@ -1069,18 +1069,18 @@ macro_rules! int_impl {
10691069 ///
10701070 /// This results in undefined behavior when `rhs == 0`, `self % rhs != 0`, or
10711071 #[ doc = concat!( "`self == " , stringify!( $SelfT) , "::MIN && rhs == -1`," ) ]
1072- /// i.e. when [`checked_exact_div `](Self::checked_exact_div ) would return `None`.
1072+ /// i.e. when [`checked_div_exact `](Self::checked_div_exact ) would return `None`.
10731073 #[ unstable(
10741074 feature = "exact_div" ,
10751075 issue = "139911" ,
10761076 ) ]
10771077 #[ must_use = "this returns the result of the operation, \
10781078 without modifying the original"]
10791079 #[ inline]
1080- pub const unsafe fn unchecked_exact_div ( self , rhs: Self ) -> Self {
1080+ pub const unsafe fn unchecked_div_exact ( self , rhs: Self ) -> Self {
10811081 assert_unsafe_precondition!(
10821082 check_language_ub,
1083- concat!( stringify!( $SelfT) , "::unchecked_exact_div cannot overflow, divide by zero, or leave a remainder" ) ,
1083+ concat!( stringify!( $SelfT) , "::unchecked_div_exact cannot overflow, divide by zero, or leave a remainder" ) ,
10841084 (
10851085 lhs: $SelfT = self ,
10861086 rhs: $SelfT = rhs,
0 commit comments