Skip to content

Commit cdb69e2

Browse files
committed
std: Stabilize the remaining wrapping_* functions
This commit stabilizes the remaining `wrapping_*` functions on the primitive integer types as they follow the same conventions as other wrapping methods are were likely just initially unstable to be conservative.
1 parent 8797c9e commit cdb69e2

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/libcore/num/mod.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ macro_rules! int_impl {
468468
/// to `-MIN`, a positive value that is too large to represent
469469
/// in the type. In such a case, this function returns `MIN`
470470
/// itself..
471-
#[unstable(feature = "num_wrapping")]
471+
#[stable(feature = "num_wrapping", since = "1.2.0")]
472472
#[inline(always)]
473473
pub fn wrapping_div(self, rhs: Self) -> Self {
474474
self.overflowing_div(rhs).0
@@ -481,7 +481,7 @@ macro_rules! int_impl {
481481
/// implementation artifacts make `x % y` illegal for `MIN /
482482
/// -1` on a signed type illegal (where `MIN` is the negative
483483
/// minimal value). In such a case, this function returns `0`.
484-
#[unstable(feature = "num_wrapping")]
484+
#[stable(feature = "num_wrapping", since = "1.2.0")]
485485
#[inline(always)]
486486
pub fn wrapping_rem(self, rhs: Self) -> Self {
487487
self.overflowing_rem(rhs).0
@@ -495,7 +495,7 @@ macro_rules! int_impl {
495495
/// negative minimal value for the type); this is a positive
496496
/// value that is too large to represent in the type. In such
497497
/// a case, this function returns `MIN` itself.
498-
#[unstable(feature = "num_wrapping")]
498+
#[stable(feature = "num_wrapping", since = "1.2.0")]
499499
#[inline(always)]
500500
pub fn wrapping_neg(self) -> Self {
501501
self.overflowing_neg().0
@@ -504,7 +504,7 @@ macro_rules! int_impl {
504504
/// Panic-free bitwise shift-left; yields `self << mask(rhs)`,
505505
/// where `mask` removes any high-order bits of `rhs` that
506506
/// would cause the shift to exceed the bitwidth of the type.
507-
#[unstable(feature = "num_wrapping")]
507+
#[stable(feature = "num_wrapping", since = "1.2.0")]
508508
#[inline(always)]
509509
pub fn wrapping_shl(self, rhs: u32) -> Self {
510510
self.overflowing_shl(rhs).0
@@ -513,7 +513,7 @@ macro_rules! int_impl {
513513
/// Panic-free bitwise shift-left; yields `self >> mask(rhs)`,
514514
/// where `mask` removes any high-order bits of `rhs` that
515515
/// would cause the shift to exceed the bitwidth of the type.
516-
#[unstable(feature = "num_wrapping")]
516+
#[stable(feature = "num_wrapping", since = "1.2.0")]
517517
#[inline(always)]
518518
pub fn wrapping_shr(self, rhs: u32) -> Self {
519519
self.overflowing_shr(rhs).0
@@ -1038,7 +1038,7 @@ macro_rules! uint_impl {
10381038
/// to `-MIN`, a positive value that is too large to represent
10391039
/// in the type. In such a case, this function returns `MIN`
10401040
/// itself..
1041-
#[unstable(feature = "num_wrapping")]
1041+
#[stable(feature = "num_wrapping", since = "1.2.0")]
10421042
#[inline(always)]
10431043
pub fn wrapping_div(self, rhs: Self) -> Self {
10441044
self.overflowing_div(rhs).0
@@ -1051,7 +1051,7 @@ macro_rules! uint_impl {
10511051
/// implementation artifacts make `x % y` illegal for `MIN /
10521052
/// -1` on a signed type illegal (where `MIN` is the negative
10531053
/// minimal value). In such a case, this function returns `0`.
1054-
#[unstable(feature = "num_wrapping")]
1054+
#[stable(feature = "num_wrapping", since = "1.2.0")]
10551055
#[inline(always)]
10561056
pub fn wrapping_rem(self, rhs: Self) -> Self {
10571057
self.overflowing_rem(rhs).0
@@ -1065,7 +1065,7 @@ macro_rules! uint_impl {
10651065
/// negative minimal value for the type); this is a positive
10661066
/// value that is too large to represent in the type. In such
10671067
/// a case, this function returns `MIN` itself.
1068-
#[unstable(feature = "num_wrapping")]
1068+
#[stable(feature = "num_wrapping", since = "1.2.0")]
10691069
#[inline(always)]
10701070
pub fn wrapping_neg(self) -> Self {
10711071
self.overflowing_neg().0
@@ -1074,7 +1074,7 @@ macro_rules! uint_impl {
10741074
/// Panic-free bitwise shift-left; yields `self << mask(rhs)`,
10751075
/// where `mask` removes any high-order bits of `rhs` that
10761076
/// would cause the shift to exceed the bitwidth of the type.
1077-
#[unstable(feature = "num_wrapping")]
1077+
#[stable(feature = "num_wrapping", since = "1.2.0")]
10781078
#[inline(always)]
10791079
pub fn wrapping_shl(self, rhs: u32) -> Self {
10801080
self.overflowing_shl(rhs).0
@@ -1083,7 +1083,7 @@ macro_rules! uint_impl {
10831083
/// Panic-free bitwise shift-left; yields `self >> mask(rhs)`,
10841084
/// where `mask` removes any high-order bits of `rhs` that
10851085
/// would cause the shift to exceed the bitwidth of the type.
1086-
#[unstable(feature = "num_wrapping")]
1086+
#[stable(feature = "num_wrapping", since = "1.2.0")]
10871087
#[inline(always)]
10881088
pub fn wrapping_shr(self, rhs: u32) -> Self {
10891089
self.overflowing_shr(rhs).0

0 commit comments

Comments
 (0)