Skip to content

Commit bfa3e8a

Browse files
committed
Stabilize feature nonzero_negation_ops
1 parent eb7a743 commit bfa3e8a

File tree

1 file changed

+12
-18
lines changed

1 file changed

+12
-18
lines changed

library/core/src/num/nonzero.rs

+12-18
Original file line numberDiff line numberDiff line change
@@ -719,8 +719,6 @@ macro_rules! nonzero_signed_operations {
719719
/// # Example
720720
///
721721
/// ```
722-
/// #![feature(nonzero_negation_ops)]
723-
///
724722
#[doc = concat!("# use std::num::", stringify!($Ty), ";")]
725723
/// # fn main() { test().unwrap(); }
726724
/// # fn test() -> Option<()> {
@@ -734,7 +732,8 @@ macro_rules! nonzero_signed_operations {
734732
/// ```
735733
#[must_use]
736734
#[inline]
737-
#[unstable(feature = "nonzero_negation_ops", issue = "102443")]
735+
#[stable(feature = "nonzero_negation_ops", since = "CURRENT_RUSTC_VERSION")]
736+
#[rustc_const_stable(feature = "nonzero_negation_ops", since = "CURRENT_RUSTC_VERSION")]
738737
pub const fn is_positive(self) -> bool {
739738
self.get().is_positive()
740739
}
@@ -745,8 +744,6 @@ macro_rules! nonzero_signed_operations {
745744
/// # Example
746745
///
747746
/// ```
748-
/// #![feature(nonzero_negation_ops)]
749-
///
750747
#[doc = concat!("# use std::num::", stringify!($Ty), ";")]
751748
/// # fn main() { test().unwrap(); }
752749
/// # fn test() -> Option<()> {
@@ -760,7 +757,8 @@ macro_rules! nonzero_signed_operations {
760757
/// ```
761758
#[must_use]
762759
#[inline]
763-
#[unstable(feature = "nonzero_negation_ops", issue = "102443")]
760+
#[stable(feature = "nonzero_negation_ops", since = "CURRENT_RUSTC_VERSION")]
761+
#[rustc_const_stable(feature = "nonzero_negation_ops", since = "CURRENT_RUSTC_VERSION")]
764762
pub const fn is_negative(self) -> bool {
765763
self.get().is_negative()
766764
}
@@ -770,8 +768,6 @@ macro_rules! nonzero_signed_operations {
770768
/// # Example
771769
///
772770
/// ```
773-
/// #![feature(nonzero_negation_ops)]
774-
///
775771
#[doc = concat!("# use std::num::", stringify!($Ty), ";")]
776772
/// # fn main() { test().unwrap(); }
777773
/// # fn test() -> Option<()> {
@@ -786,7 +782,8 @@ macro_rules! nonzero_signed_operations {
786782
/// # }
787783
/// ```
788784
#[inline]
789-
#[unstable(feature = "nonzero_negation_ops", issue = "102443")]
785+
#[stable(feature = "nonzero_negation_ops", since = "CURRENT_RUSTC_VERSION")]
786+
#[rustc_const_stable(feature = "nonzero_negation_ops", since = "CURRENT_RUSTC_VERSION")]
790787
pub const fn checked_neg(self) -> Option<$Ty> {
791788
if let Some(result) = self.get().checked_neg() {
792789
// SAFETY: negation of nonzero cannot yield zero values.
@@ -803,8 +800,6 @@ macro_rules! nonzero_signed_operations {
803800
/// # Example
804801
///
805802
/// ```
806-
/// #![feature(nonzero_negation_ops)]
807-
///
808803
#[doc = concat!("# use std::num::", stringify!($Ty), ";")]
809804
/// # fn main() { test().unwrap(); }
810805
/// # fn test() -> Option<()> {
@@ -819,7 +814,8 @@ macro_rules! nonzero_signed_operations {
819814
/// # }
820815
/// ```
821816
#[inline]
822-
#[unstable(feature = "nonzero_negation_ops", issue = "102443")]
817+
#[stable(feature = "nonzero_negation_ops", since = "CURRENT_RUSTC_VERSION")]
818+
#[rustc_const_stable(feature = "nonzero_negation_ops", since = "CURRENT_RUSTC_VERSION")]
823819
pub const fn overflowing_neg(self) -> ($Ty, bool) {
824820
let (result, overflow) = self.get().overflowing_neg();
825821
// SAFETY: negation of nonzero cannot yield zero values.
@@ -832,8 +828,6 @@ macro_rules! nonzero_signed_operations {
832828
/// # Example
833829
///
834830
/// ```
835-
/// #![feature(nonzero_negation_ops)]
836-
///
837831
#[doc = concat!("# use std::num::", stringify!($Ty), ";")]
838832
/// # fn main() { test().unwrap(); }
839833
/// # fn test() -> Option<()> {
@@ -853,7 +847,8 @@ macro_rules! nonzero_signed_operations {
853847
/// # }
854848
/// ```
855849
#[inline]
856-
#[unstable(feature = "nonzero_negation_ops", issue = "102443")]
850+
#[stable(feature = "nonzero_negation_ops", since = "CURRENT_RUSTC_VERSION")]
851+
#[rustc_const_stable(feature = "nonzero_negation_ops", since = "CURRENT_RUSTC_VERSION")]
857852
pub const fn saturating_neg(self) -> $Ty {
858853
if let Some(result) = self.checked_neg() {
859854
return result;
@@ -870,8 +865,6 @@ macro_rules! nonzero_signed_operations {
870865
/// # Example
871866
///
872867
/// ```
873-
/// #![feature(nonzero_negation_ops)]
874-
///
875868
#[doc = concat!("# use std::num::", stringify!($Ty), ";")]
876869
/// # fn main() { test().unwrap(); }
877870
/// # fn test() -> Option<()> {
@@ -886,7 +879,8 @@ macro_rules! nonzero_signed_operations {
886879
/// # }
887880
/// ```
888881
#[inline]
889-
#[unstable(feature = "nonzero_negation_ops", issue = "102443")]
882+
#[stable(feature = "nonzero_negation_ops", since = "CURRENT_RUSTC_VERSION")]
883+
#[rustc_const_stable(feature = "nonzero_negation_ops", since = "CURRENT_RUSTC_VERSION")]
890884
pub const fn wrapping_neg(self) -> $Ty {
891885
let result = self.get().wrapping_neg();
892886
// SAFETY: negation of nonzero cannot yield zero values.

0 commit comments

Comments
 (0)