From 9e8f4b4f21a75a323ad8cd348a5b567ef71880a9 Mon Sep 17 00:00:00 2001 From: Caio Date: Mon, 9 Jan 2023 09:30:00 -0300 Subject: [PATCH 1/2] Stabilize `nonzero_min_max` --- core/src/num/nonzero.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/num/nonzero.rs b/core/src/num/nonzero.rs index fbda8f82b..bbb3b6453 100644 --- a/core/src/num/nonzero.rs +++ b/core/src/num/nonzero.rs @@ -1152,7 +1152,7 @@ macro_rules! nonzero_min_max_unsigned { #[doc = concat!("# use std::num::", stringify!($Ty), ";")] #[doc = concat!("assert_eq!(", stringify!($Ty), "::MIN.get(), 1", stringify!($Int), ");")] /// ``` - #[unstable(feature = "nonzero_min_max", issue = "89065")] + #[stable(feature = "nonzero_min_max", since = "CURRENT_RUSTC_VERSION")] pub const MIN: Self = Self::new(1).unwrap(); /// The largest value that can be represented by this non-zero @@ -1167,7 +1167,7 @@ macro_rules! nonzero_min_max_unsigned { #[doc = concat!("# use std::num::", stringify!($Ty), ";")] #[doc = concat!("assert_eq!(", stringify!($Ty), "::MAX.get(), ", stringify!($Int), "::MAX);")] /// ``` - #[unstable(feature = "nonzero_min_max", issue = "89065")] + #[stable(feature = "nonzero_min_max", since = "CURRENT_RUSTC_VERSION")] pub const MAX: Self = Self::new(<$Int>::MAX).unwrap(); } )+ @@ -1194,7 +1194,7 @@ macro_rules! nonzero_min_max_signed { #[doc = concat!("# use std::num::", stringify!($Ty), ";")] #[doc = concat!("assert_eq!(", stringify!($Ty), "::MIN.get(), ", stringify!($Int), "::MIN);")] /// ``` - #[unstable(feature = "nonzero_min_max", issue = "89065")] + #[stable(feature = "nonzero_min_max", since = "CURRENT_RUSTC_VERSION")] pub const MIN: Self = Self::new(<$Int>::MIN).unwrap(); /// The largest value that can be represented by this non-zero @@ -1213,7 +1213,7 @@ macro_rules! nonzero_min_max_signed { #[doc = concat!("# use std::num::", stringify!($Ty), ";")] #[doc = concat!("assert_eq!(", stringify!($Ty), "::MAX.get(), ", stringify!($Int), "::MAX);")] /// ``` - #[unstable(feature = "nonzero_min_max", issue = "89065")] + #[stable(feature = "nonzero_min_max", since = "CURRENT_RUSTC_VERSION")] pub const MAX: Self = Self::new(<$Int>::MAX).unwrap(); } )+ From 44afe76ba9ddf5318458349f2c6dfbe4b7307004 Mon Sep 17 00:00:00 2001 From: Caio Date: Mon, 9 Jan 2023 10:01:38 -0300 Subject: [PATCH 2/2] Remove unstable feature --- core/src/num/nonzero.rs | 8 -------- 1 file changed, 8 deletions(-) diff --git a/core/src/num/nonzero.rs b/core/src/num/nonzero.rs index bbb3b6453..06d22d84a 100644 --- a/core/src/num/nonzero.rs +++ b/core/src/num/nonzero.rs @@ -1147,8 +1147,6 @@ macro_rules! nonzero_min_max_unsigned { /// # Examples /// /// ``` - /// #![feature(nonzero_min_max)] - /// #[doc = concat!("# use std::num::", stringify!($Ty), ";")] #[doc = concat!("assert_eq!(", stringify!($Ty), "::MIN.get(), 1", stringify!($Int), ");")] /// ``` @@ -1162,8 +1160,6 @@ macro_rules! nonzero_min_max_unsigned { /// # Examples /// /// ``` - /// #![feature(nonzero_min_max)] - /// #[doc = concat!("# use std::num::", stringify!($Ty), ";")] #[doc = concat!("assert_eq!(", stringify!($Ty), "::MAX.get(), ", stringify!($Int), "::MAX);")] /// ``` @@ -1189,8 +1185,6 @@ macro_rules! nonzero_min_max_signed { /// # Examples /// /// ``` - /// #![feature(nonzero_min_max)] - /// #[doc = concat!("# use std::num::", stringify!($Ty), ";")] #[doc = concat!("assert_eq!(", stringify!($Ty), "::MIN.get(), ", stringify!($Int), "::MIN);")] /// ``` @@ -1208,8 +1202,6 @@ macro_rules! nonzero_min_max_signed { /// # Examples /// /// ``` - /// #![feature(nonzero_min_max)] - /// #[doc = concat!("# use std::num::", stringify!($Ty), ";")] #[doc = concat!("assert_eq!(", stringify!($Ty), "::MAX.get(), ", stringify!($Int), "::MAX);")] /// ```