From 1b32a7a4cf540ca5776a5cb66ab16019ace4cebd Mon Sep 17 00:00:00 2001 From: Jacob Pratt Date: Mon, 8 Feb 2021 19:22:08 -0500 Subject: [PATCH] Bump stabilization version for const int methods These methods missed the beta cutoff --- library/core/src/intrinsics.rs | 4 ++-- library/core/src/num/int_macros.rs | 28 ++++++++++++++-------------- library/core/src/num/uint_macros.rs | 28 ++++++++++++++-------------- 3 files changed, 30 insertions(+), 30 deletions(-) diff --git a/library/core/src/intrinsics.rs b/library/core/src/intrinsics.rs index 653fbcabfe5..cced686494b 100644 --- a/library/core/src/intrinsics.rs +++ b/library/core/src/intrinsics.rs @@ -1593,7 +1593,7 @@ /// Safe wrappers for this intrinsic are available on the integer /// primitives via the `checked_div` method. For example, /// [`u32::checked_div`] - #[rustc_const_stable(feature = "const_int_unchecked_arith", since = "1.51.0")] + #[rustc_const_stable(feature = "const_int_unchecked_arith", since = "1.52.0")] pub fn unchecked_div(x: T, y: T) -> T; /// Returns the remainder of an unchecked division, resulting in /// undefined behavior when `y == 0` or `x == T::MIN && y == -1` @@ -1601,7 +1601,7 @@ /// Safe wrappers for this intrinsic are available on the integer /// primitives via the `checked_rem` method. For example, /// [`u32::checked_rem`] - #[rustc_const_stable(feature = "const_int_unchecked_arith", since = "1.51.0")] + #[rustc_const_stable(feature = "const_int_unchecked_arith", since = "1.52.0")] pub fn unchecked_rem(x: T, y: T) -> T; /// Performs an unchecked left shift, resulting in undefined behavior when diff --git a/library/core/src/num/int_macros.rs b/library/core/src/num/int_macros.rs index 2e2e1b0f2ec..c449e50f829 100644 --- a/library/core/src/num/int_macros.rs +++ b/library/core/src/num/int_macros.rs @@ -513,7 +513,7 @@ pub unsafe fn unchecked_mul(self, rhs: Self) -> Self { #[doc = concat!("assert_eq!((1", stringify!($SelfT), ").checked_div(0), None);")] /// ``` #[stable(feature = "rust1", since = "1.0.0")] - #[rustc_const_stable(feature = "const_checked_int_methods", since = "1.51.0")] + #[rustc_const_stable(feature = "const_checked_int_methods", since = "1.52.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -539,7 +539,7 @@ pub const fn checked_div(self, rhs: Self) -> Option { #[doc = concat!("assert_eq!((1", stringify!($SelfT), ").checked_div_euclid(0), None);")] /// ``` #[stable(feature = "euclidean_division", since = "1.38.0")] - #[rustc_const_stable(feature = "const_euclidean_int_methods", since = "1.51.0")] + #[rustc_const_stable(feature = "const_euclidean_int_methods", since = "1.52.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -565,7 +565,7 @@ pub const fn checked_div_euclid(self, rhs: Self) -> Option { #[doc = concat!("assert_eq!(", stringify!($SelfT), "::MIN.checked_rem(-1), None);")] /// ``` #[stable(feature = "wrapping", since = "1.7.0")] - #[rustc_const_stable(feature = "const_checked_int_methods", since = "1.51.0")] + #[rustc_const_stable(feature = "const_checked_int_methods", since = "1.52.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -591,7 +591,7 @@ pub const fn checked_rem(self, rhs: Self) -> Option { #[doc = concat!("assert_eq!(", stringify!($SelfT), "::MIN.checked_rem_euclid(-1), None);")] /// ``` #[stable(feature = "euclidean_division", since = "1.38.0")] - #[rustc_const_stable(feature = "const_euclidean_int_methods", since = "1.51.0")] + #[rustc_const_stable(feature = "const_euclidean_int_methods", since = "1.52.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -949,7 +949,7 @@ pub const fn wrapping_mul(self, rhs: Self) -> Self { /// assert_eq!((-128i8).wrapping_div(-1), -128); /// ``` #[stable(feature = "num_wrapping", since = "1.2.0")] - #[rustc_const_stable(feature = "const_wrapping_int_methods", since = "1.51.0")] + #[rustc_const_stable(feature = "const_wrapping_int_methods", since = "1.52.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -977,7 +977,7 @@ pub const fn wrapping_div(self, rhs: Self) -> Self { /// assert_eq!((-128i8).wrapping_div_euclid(-1), -128); /// ``` #[stable(feature = "euclidean_division", since = "1.38.0")] - #[rustc_const_stable(feature = "const_euclidean_int_methods", since = "1.51.0")] + #[rustc_const_stable(feature = "const_euclidean_int_methods", since = "1.52.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -1005,7 +1005,7 @@ pub const fn wrapping_div_euclid(self, rhs: Self) -> Self { /// assert_eq!((-128i8).wrapping_rem(-1), 0); /// ``` #[stable(feature = "num_wrapping", since = "1.2.0")] - #[rustc_const_stable(feature = "const_wrapping_int_methods", since = "1.51.0")] + #[rustc_const_stable(feature = "const_wrapping_int_methods", since = "1.52.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -1032,7 +1032,7 @@ pub const fn wrapping_rem(self, rhs: Self) -> Self { /// assert_eq!((-128i8).wrapping_rem_euclid(-1), 0); /// ``` #[stable(feature = "euclidean_division", since = "1.38.0")] - #[rustc_const_stable(feature = "const_euclidean_int_methods", since = "1.51.0")] + #[rustc_const_stable(feature = "const_euclidean_int_methods", since = "1.52.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -1299,7 +1299,7 @@ pub const fn overflowing_mul(self, rhs: Self) -> (Self, bool) { /// ``` #[inline] #[stable(feature = "wrapping", since = "1.7.0")] - #[rustc_const_stable(feature = "const_overflowing_int_methods", since = "1.51.0")] + #[rustc_const_stable(feature = "const_overflowing_int_methods", since = "1.52.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] pub const fn overflowing_div(self, rhs: Self) -> (Self, bool) { @@ -1329,7 +1329,7 @@ pub const fn overflowing_div(self, rhs: Self) -> (Self, bool) { /// ``` #[inline] #[stable(feature = "euclidean_division", since = "1.38.0")] - #[rustc_const_stable(feature = "const_euclidean_int_methods", since = "1.51.0")] + #[rustc_const_stable(feature = "const_euclidean_int_methods", since = "1.52.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] pub const fn overflowing_div_euclid(self, rhs: Self) -> (Self, bool) { @@ -1360,7 +1360,7 @@ pub const fn overflowing_div_euclid(self, rhs: Self) -> (Self, bool) { /// ``` #[inline] #[stable(feature = "wrapping", since = "1.7.0")] - #[rustc_const_stable(feature = "const_overflowing_int_methods", since = "1.51.0")] + #[rustc_const_stable(feature = "const_overflowing_int_methods", since = "1.52.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] pub const fn overflowing_rem(self, rhs: Self) -> (Self, bool) { @@ -1390,7 +1390,7 @@ pub const fn overflowing_rem(self, rhs: Self) -> (Self, bool) { #[doc = concat!("assert_eq!(", stringify!($SelfT), "::MIN.overflowing_rem_euclid(-1), (0, true));")] /// ``` #[stable(feature = "euclidean_division", since = "1.38.0")] - #[rustc_const_stable(feature = "const_euclidean_int_methods", since = "1.51.0")] + #[rustc_const_stable(feature = "const_euclidean_int_methods", since = "1.52.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -1615,7 +1615,7 @@ pub const fn pow(self, mut exp: u32) -> Self { /// assert_eq!((-a).div_euclid(-b), 2); // -7 >= -4 * 2 /// ``` #[stable(feature = "euclidean_division", since = "1.38.0")] - #[rustc_const_stable(feature = "const_euclidean_int_methods", since = "1.51.0")] + #[rustc_const_stable(feature = "const_euclidean_int_methods", since = "1.52.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -1653,7 +1653,7 @@ pub const fn div_euclid(self, rhs: Self) -> Self { /// assert_eq!((-a).rem_euclid(-b), 1); /// ``` #[stable(feature = "euclidean_division", since = "1.38.0")] - #[rustc_const_stable(feature = "const_euclidean_int_methods", since = "1.51.0")] + #[rustc_const_stable(feature = "const_euclidean_int_methods", since = "1.52.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] diff --git a/library/core/src/num/uint_macros.rs b/library/core/src/num/uint_macros.rs index 3f235c20123..6b61e4bffe7 100644 --- a/library/core/src/num/uint_macros.rs +++ b/library/core/src/num/uint_macros.rs @@ -522,7 +522,7 @@ pub unsafe fn unchecked_mul(self, rhs: Self) -> Self { #[doc = concat!("assert_eq!(1", stringify!($SelfT), ".checked_div(0), None);")] /// ``` #[stable(feature = "rust1", since = "1.0.0")] - #[rustc_const_stable(feature = "const_checked_int_methods", since = "1.51.0")] + #[rustc_const_stable(feature = "const_checked_int_methods", since = "1.52.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -548,7 +548,7 @@ pub const fn checked_div(self, rhs: Self) -> Option { #[doc = concat!("assert_eq!(1", stringify!($SelfT), ".checked_div_euclid(0), None);")] /// ``` #[stable(feature = "euclidean_division", since = "1.38.0")] - #[rustc_const_stable(feature = "const_euclidean_int_methods", since = "1.51.0")] + #[rustc_const_stable(feature = "const_euclidean_int_methods", since = "1.52.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -573,7 +573,7 @@ pub const fn checked_div_euclid(self, rhs: Self) -> Option { #[doc = concat!("assert_eq!(5", stringify!($SelfT), ".checked_rem(0), None);")] /// ``` #[stable(feature = "wrapping", since = "1.7.0")] - #[rustc_const_stable(feature = "const_checked_int_methods", since = "1.51.0")] + #[rustc_const_stable(feature = "const_checked_int_methods", since = "1.52.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -599,7 +599,7 @@ pub const fn checked_rem(self, rhs: Self) -> Option { #[doc = concat!("assert_eq!(5", stringify!($SelfT), ".checked_rem_euclid(0), None);")] /// ``` #[stable(feature = "euclidean_division", since = "1.38.0")] - #[rustc_const_stable(feature = "const_euclidean_int_methods", since = "1.51.0")] + #[rustc_const_stable(feature = "const_euclidean_int_methods", since = "1.52.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -876,7 +876,7 @@ pub const fn wrapping_mul(self, rhs: Self) -> Self { #[doc = concat!("assert_eq!(100", stringify!($SelfT), ".wrapping_div(10), 10);")] /// ``` #[stable(feature = "num_wrapping", since = "1.2.0")] - #[rustc_const_stable(feature = "const_wrapping_int_methods", since = "1.51.0")] + #[rustc_const_stable(feature = "const_wrapping_int_methods", since = "1.52.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -901,7 +901,7 @@ pub const fn wrapping_div(self, rhs: Self) -> Self { #[doc = concat!("assert_eq!(100", stringify!($SelfT), ".wrapping_div_euclid(10), 10);")] /// ``` #[stable(feature = "euclidean_division", since = "1.38.0")] - #[rustc_const_stable(feature = "const_euclidean_int_methods", since = "1.51.0")] + #[rustc_const_stable(feature = "const_euclidean_int_methods", since = "1.52.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -924,7 +924,7 @@ pub const fn wrapping_div_euclid(self, rhs: Self) -> Self { #[doc = concat!("assert_eq!(100", stringify!($SelfT), ".wrapping_rem(10), 0);")] /// ``` #[stable(feature = "num_wrapping", since = "1.2.0")] - #[rustc_const_stable(feature = "const_wrapping_int_methods", since = "1.51.0")] + #[rustc_const_stable(feature = "const_wrapping_int_methods", since = "1.52.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -950,7 +950,7 @@ pub const fn wrapping_rem(self, rhs: Self) -> Self { #[doc = concat!("assert_eq!(100", stringify!($SelfT), ".wrapping_rem_euclid(10), 0);")] /// ``` #[stable(feature = "euclidean_division", since = "1.38.0")] - #[rustc_const_stable(feature = "const_euclidean_int_methods", since = "1.51.0")] + #[rustc_const_stable(feature = "const_euclidean_int_methods", since = "1.52.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -1185,7 +1185,7 @@ pub const fn overflowing_mul(self, rhs: Self) -> (Self, bool) { /// ``` #[inline] #[stable(feature = "wrapping", since = "1.7.0")] - #[rustc_const_stable(feature = "const_overflowing_int_methods", since = "1.51.0")] + #[rustc_const_stable(feature = "const_overflowing_int_methods", since = "1.52.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] pub const fn overflowing_div(self, rhs: Self) -> (Self, bool) { @@ -1215,7 +1215,7 @@ pub const fn overflowing_div(self, rhs: Self) -> (Self, bool) { /// ``` #[inline] #[stable(feature = "euclidean_division", since = "1.38.0")] - #[rustc_const_stable(feature = "const_euclidean_int_methods", since = "1.51.0")] + #[rustc_const_stable(feature = "const_euclidean_int_methods", since = "1.52.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] pub const fn overflowing_div_euclid(self, rhs: Self) -> (Self, bool) { @@ -1242,7 +1242,7 @@ pub const fn overflowing_div_euclid(self, rhs: Self) -> (Self, bool) { /// ``` #[inline] #[stable(feature = "wrapping", since = "1.7.0")] - #[rustc_const_stable(feature = "const_overflowing_int_methods", since = "1.51.0")] + #[rustc_const_stable(feature = "const_overflowing_int_methods", since = "1.52.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] pub const fn overflowing_rem(self, rhs: Self) -> (Self, bool) { @@ -1272,7 +1272,7 @@ pub const fn overflowing_rem(self, rhs: Self) -> (Self, bool) { /// ``` #[inline] #[stable(feature = "euclidean_division", since = "1.38.0")] - #[rustc_const_stable(feature = "const_euclidean_int_methods", since = "1.51.0")] + #[rustc_const_stable(feature = "const_euclidean_int_methods", since = "1.52.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] pub const fn overflowing_rem_euclid(self, rhs: Self) -> (Self, bool) { @@ -1456,7 +1456,7 @@ pub const fn pow(self, mut exp: u32) -> Self { #[doc = concat!("assert_eq!(7", stringify!($SelfT), ".div_euclid(4), 1); // or any other integer type")] /// ``` #[stable(feature = "euclidean_division", since = "1.38.0")] - #[rustc_const_stable(feature = "const_euclidean_int_methods", since = "1.51.0")] + #[rustc_const_stable(feature = "const_euclidean_int_methods", since = "1.52.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -1484,7 +1484,7 @@ pub const fn div_euclid(self, rhs: Self) -> Self { #[doc = concat!("assert_eq!(7", stringify!($SelfT), ".rem_euclid(4), 3); // or any other integer type")] /// ``` #[stable(feature = "euclidean_division", since = "1.38.0")] - #[rustc_const_stable(feature = "const_euclidean_int_methods", since = "1.51.0")] + #[rustc_const_stable(feature = "const_euclidean_int_methods", since = "1.52.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline]