@@ -997,9 +997,12 @@ $EndFeature, "
997997 #[ cfg_attr( stage0, rustc_const_unstable( feature = "const_int_wrapping" ) ) ]
998998 #[ inline]
999999 pub const fn wrapping_add( self , rhs: Self ) -> Self {
1000+ #[ cfg( stage0) ]
10001001 unsafe {
10011002 intrinsics:: overflowing_add( self , rhs)
10021003 }
1004+ #[ cfg( not( stage0) ) ]
1005+ intrinsics:: overflowing_add( self , rhs)
10031006 }
10041007 }
10051008
@@ -1021,9 +1024,12 @@ $EndFeature, "
10211024 #[ cfg_attr( stage0, rustc_const_unstable( feature = "const_int_wrapping" ) ) ]
10221025 #[ inline]
10231026 pub const fn wrapping_sub( self , rhs: Self ) -> Self {
1027+ #[ cfg( stage0) ]
10241028 unsafe {
10251029 intrinsics:: overflowing_sub( self , rhs)
10261030 }
1031+ #[ cfg( not( stage0) ) ]
1032+ intrinsics:: overflowing_sub( self , rhs)
10271033 }
10281034 }
10291035
@@ -1044,9 +1050,12 @@ $EndFeature, "
10441050 #[ cfg_attr( stage0, rustc_const_unstable( feature = "const_int_wrapping" ) ) ]
10451051 #[ inline]
10461052 pub const fn wrapping_mul( self , rhs: Self ) -> Self {
1053+ #[ cfg( stage0) ]
10471054 unsafe {
10481055 intrinsics:: overflowing_mul( self , rhs)
10491056 }
1057+ #[ cfg( not( stage0) ) ]
1058+ intrinsics:: overflowing_mul( self , rhs)
10501059 }
10511060 }
10521061
@@ -2311,7 +2320,10 @@ assert_eq!(n.rotate_left(", $rot, "), m);
23112320 #[ cfg_attr( stage0, rustc_const_unstable( feature = "const_int_rotate" ) ) ]
23122321 #[ inline]
23132322 pub const fn rotate_left( self , n: u32 ) -> Self {
2323+ #[ cfg( stage0) ]
23142324 unsafe { intrinsics:: rotate_left( self , n as $SelfT) }
2325+ #[ cfg( not( stage0) ) ]
2326+ intrinsics:: rotate_left( self , n as $SelfT)
23152327 }
23162328 }
23172329
@@ -2336,7 +2348,10 @@ assert_eq!(n.rotate_right(", $rot, "), m);
23362348 #[ cfg_attr( stage0, rustc_const_unstable( feature = "const_int_rotate" ) ) ]
23372349 #[ inline]
23382350 pub const fn rotate_right( self , n: u32 ) -> Self {
2351+ #[ cfg( stage0) ]
23392352 unsafe { intrinsics:: rotate_right( self , n as $SelfT) }
2353+ #[ cfg( not( stage0) ) ]
2354+ intrinsics:: rotate_right( self , n as $SelfT)
23402355 }
23412356 }
23422357
@@ -2885,9 +2900,12 @@ $EndFeature, "
28852900 #[ cfg_attr( stage0, rustc_const_unstable( feature = "const_int_wrapping" ) ) ]
28862901 #[ inline]
28872902 pub const fn wrapping_add( self , rhs: Self ) -> Self {
2903+ #[ cfg( stage0) ]
28882904 unsafe {
28892905 intrinsics:: overflowing_add( self , rhs)
28902906 }
2907+ #[ cfg( not( stage0) ) ]
2908+ intrinsics:: overflowing_add( self , rhs)
28912909 }
28922910 }
28932911
@@ -2908,9 +2926,12 @@ $EndFeature, "
29082926 #[ cfg_attr( stage0, rustc_const_unstable( feature = "const_int_wrapping" ) ) ]
29092927 #[ inline]
29102928 pub const fn wrapping_sub( self , rhs: Self ) -> Self {
2929+ #[ cfg( stage0) ]
29112930 unsafe {
29122931 intrinsics:: overflowing_sub( self , rhs)
29132932 }
2933+ #[ cfg( not( stage0) ) ]
2934+ intrinsics:: overflowing_sub( self , rhs)
29142935 }
29152936 }
29162937
@@ -2932,9 +2953,12 @@ $EndFeature, "
29322953 #[ cfg_attr( stage0, rustc_const_unstable( feature = "const_int_wrapping" ) ) ]
29332954 #[ inline]
29342955 pub const fn wrapping_mul( self , rhs: Self ) -> Self {
2956+ #[ cfg( stage0) ]
29352957 unsafe {
29362958 intrinsics:: overflowing_mul( self , rhs)
29372959 }
2960+ #[ cfg( not( stage0) ) ]
2961+ intrinsics:: overflowing_mul( self , rhs)
29382962 }
29392963
29402964 doc_comment! {
0 commit comments