@@ -1338,11 +1338,23 @@ $EndFeature, "
13381338 #[ must_use = "this returns the result of the operation, \
13391339 without modifying the original"]
13401340 #[ inline]
1341- pub fn wrapping_div( self , rhs: Self ) -> Self {
1341+ #[ rustc_const_unstable( feature = "const_int_wrapping" ) ]
1342+ #[ cfg( not( bootstrap) ) ]
1343+ pub const fn wrapping_div( self , rhs: Self ) -> Self {
13421344 self . overflowing_div( rhs) . 0
13431345 }
13441346 }
13451347
1348+ /// No docs for bootstrap.
1349+ #[ stable( feature = "num_wrapping" , since = "1.2.0" ) ]
1350+ #[ must_use = "this returns the result of the operation, \
1351+ without modifying the original"]
1352+ #[ inline]
1353+ #[ cfg( bootstrap) ]
1354+ pub fn wrapping_div( self , rhs: Self ) -> Self {
1355+ self . overflowing_div( rhs) . 0
1356+ }
1357+
13461358 doc_comment! {
13471359 concat!( "Wrapping Euclidean division. Computes `self.div_euclid(rhs)`,
13481360wrapping around at the boundary of the type.
@@ -1397,11 +1409,23 @@ $EndFeature, "
13971409 #[ must_use = "this returns the result of the operation, \
13981410 without modifying the original"]
13991411 #[ inline]
1400- pub fn wrapping_rem( self , rhs: Self ) -> Self {
1412+ #[ rustc_const_unstable( feature = "const_int_wrapping" ) ]
1413+ #[ cfg( not( bootstrap) ) ]
1414+ pub const fn wrapping_rem( self , rhs: Self ) -> Self {
14011415 self . overflowing_rem( rhs) . 0
14021416 }
14031417 }
14041418
1419+ /// No docs for bootstrap.
1420+ #[ stable( feature = "num_wrapping" , since = "1.2.0" ) ]
1421+ #[ must_use = "this returns the result of the operation, \
1422+ without modifying the original"]
1423+ #[ inline]
1424+ #[ cfg( bootstrap) ]
1425+ pub fn wrapping_rem( self , rhs: Self ) -> Self {
1426+ self . overflowing_rem( rhs) . 0
1427+ }
1428+
14051429 doc_comment! {
14061430 concat!( "Wrapping Euclidean remainder. Computes `self.rem_euclid(rhs)`, wrapping around
14071431at the boundary of the type.
@@ -3422,7 +3446,7 @@ $EndFeature, "
34223446 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
34233447 #[ rustc_const_stable( feature = "const_wrapping_math" , since = "1.32.0" ) ]
34243448 #[ must_use = "this returns the result of the operation, \
3425- without modifying the original"]
3449+ without modifying the original"]
34263450 #[ inline]
34273451 pub const fn wrapping_mul( self , rhs: Self ) -> Self {
34283452 intrinsics:: wrapping_mul( self , rhs)
@@ -3446,11 +3470,23 @@ Basic usage:
34463470 #[ must_use = "this returns the result of the operation, \
34473471 without modifying the original"]
34483472 #[ inline]
3449- pub fn wrapping_div( self , rhs: Self ) -> Self {
3473+ #[ rustc_const_unstable( feature = "const_int_wrapping" ) ]
3474+ #[ cfg( not( bootstrap) ) ]
3475+ pub const fn wrapping_div( self , rhs: Self ) -> Self {
34503476 self / rhs
34513477 }
34523478 }
34533479
3480+ /// No docs for bootstrap.
3481+ #[ stable( feature = "num_wrapping" , since = "1.2.0" ) ]
3482+ #[ must_use = "this returns the result of the operation, \
3483+ without modifying the original"]
3484+ #[ inline]
3485+ #[ cfg( bootstrap) ]
3486+ pub fn wrapping_div( self , rhs: Self ) -> Self {
3487+ self / rhs
3488+ }
3489+
34543490 doc_comment! {
34553491 concat!( "Wrapping Euclidean division. Computes `self.div_euclid(rhs)`.
34563492Wrapped division on unsigned types is just normal division.
@@ -3496,11 +3532,23 @@ Basic usage:
34963532 #[ must_use = "this returns the result of the operation, \
34973533 without modifying the original"]
34983534 #[ inline]
3499- pub fn wrapping_rem( self , rhs: Self ) -> Self {
3535+ #[ rustc_const_unstable( feature = "const_int_wrapping" ) ]
3536+ #[ cfg( not( bootstrap) ) ]
3537+ pub const fn wrapping_rem( self , rhs: Self ) -> Self {
35003538 self % rhs
35013539 }
35023540 }
35033541
3542+ /// No docs for bootstrap.
3543+ #[ stable( feature = "num_wrapping" , since = "1.2.0" ) ]
3544+ #[ must_use = "this returns the result of the operation, \
3545+ without modifying the original"]
3546+ #[ inline]
3547+ #[ cfg( bootstrap) ]
3548+ pub fn wrapping_rem( self , rhs: Self ) -> Self {
3549+ self % rhs
3550+ }
3551+
35043552 doc_comment! {
35053553 concat!( "Wrapping Euclidean modulo. Computes `self.rem_euclid(rhs)`.
35063554Wrapped modulo calculation on unsigned types is
0 commit comments