From 5823d7b56346247d6def30c946a49e47e7fe9848 Mon Sep 17 00:00:00 2001 From: Iago-lito Date: Mon, 30 May 2022 14:01:24 +0200 Subject: [PATCH 1/3] Partial stabilization of "nonzero_unchecked_ops". --- library/core/src/num/nonzero.rs | 52 ++++++++++++++++----------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/library/core/src/num/nonzero.rs b/library/core/src/num/nonzero.rs index 70969edd6eaf7..5a7e8ef82c87a 100644 --- a/library/core/src/num/nonzero.rs +++ b/library/core/src/num/nonzero.rs @@ -316,7 +316,6 @@ macro_rules! nonzero_unsigned_operations { /// # Examples /// /// ``` - /// #![feature(nonzero_ops)] #[doc = concat!("# use std::num::", stringify!($Ty), ";")] /// /// # fn main() { test().unwrap(); } @@ -331,7 +330,8 @@ macro_rules! nonzero_unsigned_operations { /// # Some(()) /// # } /// ``` - #[unstable(feature = "nonzero_ops", issue = "84186")] + #[stable(feature = "nonzero_checked_ops", since = "1.63.0")] + #[rustc_const_unstable(feature = "const_nonzero_checked_ops", issue = "97547")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -351,7 +351,6 @@ macro_rules! nonzero_unsigned_operations { /// # Examples /// /// ``` - /// #![feature(nonzero_ops)] #[doc = concat!("# use std::num::", stringify!($Ty), ";")] /// /// # fn main() { test().unwrap(); } @@ -366,7 +365,8 @@ macro_rules! nonzero_unsigned_operations { /// # Some(()) /// # } /// ``` - #[unstable(feature = "nonzero_ops", issue = "84186")] + #[stable(feature = "nonzero_checked_ops", since = "1.63.0")] + #[rustc_const_unstable(feature = "const_nonzero_checked_ops", issue = "97547")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -415,7 +415,6 @@ macro_rules! nonzero_unsigned_operations { /// # Examples /// /// ``` - /// #![feature(nonzero_ops)] #[doc = concat!("# use std::num::", stringify!($Ty), ";")] /// /// # fn main() { test().unwrap(); } @@ -432,7 +431,8 @@ macro_rules! nonzero_unsigned_operations { /// # Some(()) /// # } /// ``` - #[unstable(feature = "nonzero_ops", issue = "84186")] + #[stable(feature = "nonzero_checked_ops", since = "1.63.0")] + #[rustc_const_unstable(feature = "const_nonzero_checked_ops", issue = "97547")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -521,7 +521,6 @@ macro_rules! nonzero_signed_operations { /// # Example /// /// ``` - /// #![feature(nonzero_ops)] #[doc = concat!("# use std::num::", stringify!($Ty), ";")] /// /// # fn main() { test().unwrap(); } @@ -534,7 +533,8 @@ macro_rules! nonzero_signed_operations { /// # Some(()) /// # } /// ``` - #[unstable(feature = "nonzero_ops", issue = "84186")] + #[stable(feature = "nonzero_checked_ops", since = "1.63.0")] + #[rustc_const_unstable(feature = "const_nonzero_checked_ops", issue = "97547")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -551,7 +551,6 @@ macro_rules! nonzero_signed_operations { /// # Example /// /// ``` - /// #![feature(nonzero_ops)] #[doc = concat!("# use std::num::", stringify!($Ty), ";")] /// /// # fn main() { test().unwrap(); } @@ -566,7 +565,8 @@ macro_rules! nonzero_signed_operations { /// # Some(()) /// # } /// ``` - #[unstable(feature = "nonzero_ops", issue = "84186")] + #[stable(feature = "nonzero_checked_ops", since = "1.63.0")] + #[rustc_const_unstable(feature = "const_nonzero_checked_ops", issue = "97547")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -586,7 +586,6 @@ macro_rules! nonzero_signed_operations { /// # Example /// /// ``` - /// #![feature(nonzero_ops)] #[doc = concat!("# use std::num::", stringify!($Ty), ";")] /// /// # fn main() { test().unwrap(); } @@ -602,7 +601,8 @@ macro_rules! nonzero_signed_operations { /// # Some(()) /// # } /// ``` - #[unstable(feature = "nonzero_ops", issue = "84186")] + #[stable(feature = "nonzero_checked_ops", since = "1.63.0")] + #[rustc_const_unstable(feature = "const_nonzero_checked_ops", issue = "97547")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -621,7 +621,6 @@ macro_rules! nonzero_signed_operations { /// # Example /// /// ``` - /// #![feature(nonzero_ops)] #[doc = concat!("# use std::num::", stringify!($Ty), ";")] /// /// # fn main() { test().unwrap(); } @@ -642,7 +641,8 @@ macro_rules! nonzero_signed_operations { /// # Some(()) /// # } /// ``` - #[unstable(feature = "nonzero_ops", issue = "84186")] + #[stable(feature = "nonzero_checked_ops", since = "1.63.0")] + #[rustc_const_unstable(feature = "const_nonzero_checked_ops", issue = "97547")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -657,7 +657,6 @@ macro_rules! nonzero_signed_operations { /// # Example /// /// ``` - /// #![feature(nonzero_ops)] #[doc = concat!("# use std::num::", stringify!($Ty), ";")] /// /// # fn main() { test().unwrap(); } @@ -677,7 +676,8 @@ macro_rules! nonzero_signed_operations { /// # Some(()) /// # } /// ``` - #[unstable(feature = "nonzero_ops", issue = "84186")] + #[stable(feature = "nonzero_checked_ops", since = "1.63.0")] + #[rustc_const_unstable(feature = "const_nonzero_checked_ops", issue = "97547")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -692,7 +692,6 @@ macro_rules! nonzero_signed_operations { /// # Example /// /// ``` - /// #![feature(nonzero_ops)] #[doc = concat!("# use std::num::", stringify!($Ty), ";")] #[doc = concat!("# use std::num::", stringify!($Uty), ";")] /// @@ -712,7 +711,8 @@ macro_rules! nonzero_signed_operations { /// # Some(()) /// # } /// ``` - #[unstable(feature = "nonzero_ops", issue = "84186")] + #[stable(feature = "nonzero_checked_ops", since = "1.63.0")] + #[rustc_const_unstable(feature = "const_nonzero_checked_ops", issue = "97547")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -746,7 +746,6 @@ macro_rules! nonzero_unsigned_signed_operations { /// # Examples /// /// ``` - /// #![feature(nonzero_ops)] #[doc = concat!("# use std::num::", stringify!($Ty), ";")] /// /// # fn main() { test().unwrap(); } @@ -761,7 +760,8 @@ macro_rules! nonzero_unsigned_signed_operations { /// # Some(()) /// # } /// ``` - #[unstable(feature = "nonzero_ops", issue = "84186")] + #[stable(feature = "nonzero_checked_ops", since = "1.63.0")] + #[rustc_const_unstable(feature = "const_nonzero_checked_ops", issue = "97547")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -782,7 +782,6 @@ macro_rules! nonzero_unsigned_signed_operations { /// # Examples /// /// ``` - /// #![feature(nonzero_ops)] #[doc = concat!("# use std::num::", stringify!($Ty), ";")] /// /// # fn main() { test().unwrap(); } @@ -797,7 +796,8 @@ macro_rules! nonzero_unsigned_signed_operations { /// # Some(()) /// # } /// ``` - #[unstable(feature = "nonzero_ops", issue = "84186")] + #[stable(feature = "nonzero_checked_ops", since = "1.63.0")] + #[rustc_const_unstable(feature = "const_nonzero_checked_ops", issue = "97547")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -855,7 +855,6 @@ macro_rules! nonzero_unsigned_signed_operations { /// # Examples /// /// ``` - /// #![feature(nonzero_ops)] #[doc = concat!("# use std::num::", stringify!($Ty), ";")] /// /// # fn main() { test().unwrap(); } @@ -870,7 +869,8 @@ macro_rules! nonzero_unsigned_signed_operations { /// # Some(()) /// # } /// ``` - #[unstable(feature = "nonzero_ops", issue = "84186")] + #[stable(feature = "nonzero_checked_ops", since = "1.63.0")] + #[rustc_const_unstable(feature = "const_nonzero_checked_ops", issue = "97547")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -899,7 +899,6 @@ macro_rules! nonzero_unsigned_signed_operations { /// # Examples /// /// ``` - /// #![feature(nonzero_ops)] #[doc = concat!("# use std::num::", stringify!($Ty), ";")] /// /// # fn main() { test().unwrap(); } @@ -914,7 +913,8 @@ macro_rules! nonzero_unsigned_signed_operations { /// # Some(()) /// # } /// ``` - #[unstable(feature = "nonzero_ops", issue = "84186")] + #[stable(feature = "nonzero_checked_ops", since = "1.63.0")] + #[rustc_const_unstable(feature = "const_nonzero_checked_ops", issue = "97547")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] From 69e8e7e73b7e56e518a2552097578d590043a30e Mon Sep 17 00:00:00 2001 From: Iago-lito Date: Thu, 9 Jun 2022 09:17:06 +0200 Subject: [PATCH 2/3] Stabilize NonZero* checked operations constness. --- library/core/src/num/nonzero.rs | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/library/core/src/num/nonzero.rs b/library/core/src/num/nonzero.rs index 5a7e8ef82c87a..5e95edaee19ff 100644 --- a/library/core/src/num/nonzero.rs +++ b/library/core/src/num/nonzero.rs @@ -331,7 +331,7 @@ macro_rules! nonzero_unsigned_operations { /// # } /// ``` #[stable(feature = "nonzero_checked_ops", since = "1.63.0")] - #[rustc_const_unstable(feature = "const_nonzero_checked_ops", issue = "97547")] + #[rustc_const_stable(feature = "const_nonzero_checked_ops", since = "1.63.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -366,7 +366,7 @@ macro_rules! nonzero_unsigned_operations { /// # } /// ``` #[stable(feature = "nonzero_checked_ops", since = "1.63.0")] - #[rustc_const_unstable(feature = "const_nonzero_checked_ops", issue = "97547")] + #[rustc_const_stable(feature = "const_nonzero_checked_ops", since = "1.63.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -432,7 +432,7 @@ macro_rules! nonzero_unsigned_operations { /// # } /// ``` #[stable(feature = "nonzero_checked_ops", since = "1.63.0")] - #[rustc_const_unstable(feature = "const_nonzero_checked_ops", issue = "97547")] + #[rustc_const_stable(feature = "const_nonzero_checked_ops", since = "1.63.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -534,7 +534,7 @@ macro_rules! nonzero_signed_operations { /// # } /// ``` #[stable(feature = "nonzero_checked_ops", since = "1.63.0")] - #[rustc_const_unstable(feature = "const_nonzero_checked_ops", issue = "97547")] + #[rustc_const_stable(feature = "const_nonzero_checked_ops", since = "1.63.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -566,7 +566,7 @@ macro_rules! nonzero_signed_operations { /// # } /// ``` #[stable(feature = "nonzero_checked_ops", since = "1.63.0")] - #[rustc_const_unstable(feature = "const_nonzero_checked_ops", issue = "97547")] + #[rustc_const_stable(feature = "const_nonzero_checked_ops", since = "1.63.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -602,7 +602,7 @@ macro_rules! nonzero_signed_operations { /// # } /// ``` #[stable(feature = "nonzero_checked_ops", since = "1.63.0")] - #[rustc_const_unstable(feature = "const_nonzero_checked_ops", issue = "97547")] + #[rustc_const_stable(feature = "const_nonzero_checked_ops", since = "1.63.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -642,7 +642,7 @@ macro_rules! nonzero_signed_operations { /// # } /// ``` #[stable(feature = "nonzero_checked_ops", since = "1.63.0")] - #[rustc_const_unstable(feature = "const_nonzero_checked_ops", issue = "97547")] + #[rustc_const_stable(feature = "const_nonzero_checked_ops", since = "1.63.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -677,7 +677,7 @@ macro_rules! nonzero_signed_operations { /// # } /// ``` #[stable(feature = "nonzero_checked_ops", since = "1.63.0")] - #[rustc_const_unstable(feature = "const_nonzero_checked_ops", issue = "97547")] + #[rustc_const_stable(feature = "const_nonzero_checked_ops", since = "1.63.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -712,7 +712,7 @@ macro_rules! nonzero_signed_operations { /// # } /// ``` #[stable(feature = "nonzero_checked_ops", since = "1.63.0")] - #[rustc_const_unstable(feature = "const_nonzero_checked_ops", issue = "97547")] + #[rustc_const_stable(feature = "const_nonzero_checked_ops", since = "1.63.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -761,7 +761,7 @@ macro_rules! nonzero_unsigned_signed_operations { /// # } /// ``` #[stable(feature = "nonzero_checked_ops", since = "1.63.0")] - #[rustc_const_unstable(feature = "const_nonzero_checked_ops", issue = "97547")] + #[rustc_const_stable(feature = "const_nonzero_checked_ops", since = "1.63.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -797,7 +797,7 @@ macro_rules! nonzero_unsigned_signed_operations { /// # } /// ``` #[stable(feature = "nonzero_checked_ops", since = "1.63.0")] - #[rustc_const_unstable(feature = "const_nonzero_checked_ops", issue = "97547")] + #[rustc_const_stable(feature = "const_nonzero_checked_ops", since = "1.63.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -870,7 +870,7 @@ macro_rules! nonzero_unsigned_signed_operations { /// # } /// ``` #[stable(feature = "nonzero_checked_ops", since = "1.63.0")] - #[rustc_const_unstable(feature = "const_nonzero_checked_ops", issue = "97547")] + #[rustc_const_stable(feature = "const_nonzero_checked_ops", since = "1.63.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -914,7 +914,7 @@ macro_rules! nonzero_unsigned_signed_operations { /// # } /// ``` #[stable(feature = "nonzero_checked_ops", since = "1.63.0")] - #[rustc_const_unstable(feature = "const_nonzero_checked_ops", issue = "97547")] + #[rustc_const_stable(feature = "const_nonzero_checked_ops", since = "1.63.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] From 2339bb20a6ae120abf1d5ea5e7aff40f263e92f1 Mon Sep 17 00:00:00 2001 From: scottmcm Date: Sun, 26 Jun 2022 08:45:53 +0000 Subject: [PATCH 3/3] Update `since` to 1.64 (since we're after 1.63) --- library/core/src/num/nonzero.rs | 52 ++++++++++++++++----------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/library/core/src/num/nonzero.rs b/library/core/src/num/nonzero.rs index 5e95edaee19ff..e570d831cc607 100644 --- a/library/core/src/num/nonzero.rs +++ b/library/core/src/num/nonzero.rs @@ -330,8 +330,8 @@ macro_rules! nonzero_unsigned_operations { /// # Some(()) /// # } /// ``` - #[stable(feature = "nonzero_checked_ops", since = "1.63.0")] - #[rustc_const_stable(feature = "const_nonzero_checked_ops", since = "1.63.0")] + #[stable(feature = "nonzero_checked_ops", since = "1.64.0")] + #[rustc_const_stable(feature = "const_nonzero_checked_ops", since = "1.64.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -365,8 +365,8 @@ macro_rules! nonzero_unsigned_operations { /// # Some(()) /// # } /// ``` - #[stable(feature = "nonzero_checked_ops", since = "1.63.0")] - #[rustc_const_stable(feature = "const_nonzero_checked_ops", since = "1.63.0")] + #[stable(feature = "nonzero_checked_ops", since = "1.64.0")] + #[rustc_const_stable(feature = "const_nonzero_checked_ops", since = "1.64.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -431,8 +431,8 @@ macro_rules! nonzero_unsigned_operations { /// # Some(()) /// # } /// ``` - #[stable(feature = "nonzero_checked_ops", since = "1.63.0")] - #[rustc_const_stable(feature = "const_nonzero_checked_ops", since = "1.63.0")] + #[stable(feature = "nonzero_checked_ops", since = "1.64.0")] + #[rustc_const_stable(feature = "const_nonzero_checked_ops", since = "1.64.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -533,8 +533,8 @@ macro_rules! nonzero_signed_operations { /// # Some(()) /// # } /// ``` - #[stable(feature = "nonzero_checked_ops", since = "1.63.0")] - #[rustc_const_stable(feature = "const_nonzero_checked_ops", since = "1.63.0")] + #[stable(feature = "nonzero_checked_ops", since = "1.64.0")] + #[rustc_const_stable(feature = "const_nonzero_checked_ops", since = "1.64.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -565,8 +565,8 @@ macro_rules! nonzero_signed_operations { /// # Some(()) /// # } /// ``` - #[stable(feature = "nonzero_checked_ops", since = "1.63.0")] - #[rustc_const_stable(feature = "const_nonzero_checked_ops", since = "1.63.0")] + #[stable(feature = "nonzero_checked_ops", since = "1.64.0")] + #[rustc_const_stable(feature = "const_nonzero_checked_ops", since = "1.64.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -601,8 +601,8 @@ macro_rules! nonzero_signed_operations { /// # Some(()) /// # } /// ``` - #[stable(feature = "nonzero_checked_ops", since = "1.63.0")] - #[rustc_const_stable(feature = "const_nonzero_checked_ops", since = "1.63.0")] + #[stable(feature = "nonzero_checked_ops", since = "1.64.0")] + #[rustc_const_stable(feature = "const_nonzero_checked_ops", since = "1.64.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -641,8 +641,8 @@ macro_rules! nonzero_signed_operations { /// # Some(()) /// # } /// ``` - #[stable(feature = "nonzero_checked_ops", since = "1.63.0")] - #[rustc_const_stable(feature = "const_nonzero_checked_ops", since = "1.63.0")] + #[stable(feature = "nonzero_checked_ops", since = "1.64.0")] + #[rustc_const_stable(feature = "const_nonzero_checked_ops", since = "1.64.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -676,8 +676,8 @@ macro_rules! nonzero_signed_operations { /// # Some(()) /// # } /// ``` - #[stable(feature = "nonzero_checked_ops", since = "1.63.0")] - #[rustc_const_stable(feature = "const_nonzero_checked_ops", since = "1.63.0")] + #[stable(feature = "nonzero_checked_ops", since = "1.64.0")] + #[rustc_const_stable(feature = "const_nonzero_checked_ops", since = "1.64.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -711,8 +711,8 @@ macro_rules! nonzero_signed_operations { /// # Some(()) /// # } /// ``` - #[stable(feature = "nonzero_checked_ops", since = "1.63.0")] - #[rustc_const_stable(feature = "const_nonzero_checked_ops", since = "1.63.0")] + #[stable(feature = "nonzero_checked_ops", since = "1.64.0")] + #[rustc_const_stable(feature = "const_nonzero_checked_ops", since = "1.64.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -760,8 +760,8 @@ macro_rules! nonzero_unsigned_signed_operations { /// # Some(()) /// # } /// ``` - #[stable(feature = "nonzero_checked_ops", since = "1.63.0")] - #[rustc_const_stable(feature = "const_nonzero_checked_ops", since = "1.63.0")] + #[stable(feature = "nonzero_checked_ops", since = "1.64.0")] + #[rustc_const_stable(feature = "const_nonzero_checked_ops", since = "1.64.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -796,8 +796,8 @@ macro_rules! nonzero_unsigned_signed_operations { /// # Some(()) /// # } /// ``` - #[stable(feature = "nonzero_checked_ops", since = "1.63.0")] - #[rustc_const_stable(feature = "const_nonzero_checked_ops", since = "1.63.0")] + #[stable(feature = "nonzero_checked_ops", since = "1.64.0")] + #[rustc_const_stable(feature = "const_nonzero_checked_ops", since = "1.64.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -869,8 +869,8 @@ macro_rules! nonzero_unsigned_signed_operations { /// # Some(()) /// # } /// ``` - #[stable(feature = "nonzero_checked_ops", since = "1.63.0")] - #[rustc_const_stable(feature = "const_nonzero_checked_ops", since = "1.63.0")] + #[stable(feature = "nonzero_checked_ops", since = "1.64.0")] + #[rustc_const_stable(feature = "const_nonzero_checked_ops", since = "1.64.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -913,8 +913,8 @@ macro_rules! nonzero_unsigned_signed_operations { /// # Some(()) /// # } /// ``` - #[stable(feature = "nonzero_checked_ops", since = "1.63.0")] - #[rustc_const_stable(feature = "const_nonzero_checked_ops", since = "1.63.0")] + #[stable(feature = "nonzero_checked_ops", since = "1.64.0")] + #[rustc_const_stable(feature = "const_nonzero_checked_ops", since = "1.64.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline]