@@ -756,8 +756,6 @@ macro_rules! nonzero_signed_operations {
756756 /// # Example
757757 ///
758758 /// ```
759- /// #![feature(nonzero_negation_ops)]
760- ///
761759 #[ doc = concat!( "# use std::num::" , stringify!( $Ty) , ";" ) ]
762760 /// # fn main() { test().unwrap(); }
763761 /// # fn test() -> Option<()> {
@@ -771,7 +769,8 @@ macro_rules! nonzero_signed_operations {
771769 /// ```
772770 #[ must_use]
773771 #[ inline]
774- #[ unstable( feature = "nonzero_negation_ops" , issue = "102443" ) ]
772+ #[ stable( feature = "nonzero_negation_ops" , since = "CURRENT_RUSTC_VERSION" ) ]
773+ #[ rustc_const_stable( feature = "nonzero_negation_ops" , since = "CURRENT_RUSTC_VERSION" ) ]
775774 pub const fn is_positive( self ) -> bool {
776775 self . get( ) . is_positive( )
777776 }
@@ -782,8 +781,6 @@ macro_rules! nonzero_signed_operations {
782781 /// # Example
783782 ///
784783 /// ```
785- /// #![feature(nonzero_negation_ops)]
786- ///
787784 #[ doc = concat!( "# use std::num::" , stringify!( $Ty) , ";" ) ]
788785 /// # fn main() { test().unwrap(); }
789786 /// # fn test() -> Option<()> {
@@ -797,7 +794,8 @@ macro_rules! nonzero_signed_operations {
797794 /// ```
798795 #[ must_use]
799796 #[ inline]
800- #[ unstable( feature = "nonzero_negation_ops" , issue = "102443" ) ]
797+ #[ stable( feature = "nonzero_negation_ops" , since = "CURRENT_RUSTC_VERSION" ) ]
798+ #[ rustc_const_stable( feature = "nonzero_negation_ops" , since = "CURRENT_RUSTC_VERSION" ) ]
801799 pub const fn is_negative( self ) -> bool {
802800 self . get( ) . is_negative( )
803801 }
@@ -807,8 +805,6 @@ macro_rules! nonzero_signed_operations {
807805 /// # Example
808806 ///
809807 /// ```
810- /// #![feature(nonzero_negation_ops)]
811- ///
812808 #[ doc = concat!( "# use std::num::" , stringify!( $Ty) , ";" ) ]
813809 /// # fn main() { test().unwrap(); }
814810 /// # fn test() -> Option<()> {
@@ -823,7 +819,8 @@ macro_rules! nonzero_signed_operations {
823819 /// # }
824820 /// ```
825821 #[ inline]
826- #[ unstable( feature = "nonzero_negation_ops" , issue = "102443" ) ]
822+ #[ stable( feature = "nonzero_negation_ops" , since = "CURRENT_RUSTC_VERSION" ) ]
823+ #[ rustc_const_stable( feature = "nonzero_negation_ops" , since = "CURRENT_RUSTC_VERSION" ) ]
827824 pub const fn checked_neg( self ) -> Option <$Ty> {
828825 if let Some ( result) = self . get( ) . checked_neg( ) {
829826 // SAFETY: negation of nonzero cannot yield zero values.
@@ -840,8 +837,6 @@ macro_rules! nonzero_signed_operations {
840837 /// # Example
841838 ///
842839 /// ```
843- /// #![feature(nonzero_negation_ops)]
844- ///
845840 #[ doc = concat!( "# use std::num::" , stringify!( $Ty) , ";" ) ]
846841 /// # fn main() { test().unwrap(); }
847842 /// # fn test() -> Option<()> {
@@ -856,7 +851,8 @@ macro_rules! nonzero_signed_operations {
856851 /// # }
857852 /// ```
858853 #[ inline]
859- #[ unstable( feature = "nonzero_negation_ops" , issue = "102443" ) ]
854+ #[ stable( feature = "nonzero_negation_ops" , since = "CURRENT_RUSTC_VERSION" ) ]
855+ #[ rustc_const_stable( feature = "nonzero_negation_ops" , since = "CURRENT_RUSTC_VERSION" ) ]
860856 pub const fn overflowing_neg( self ) -> ( $Ty, bool ) {
861857 let ( result, overflow) = self . get( ) . overflowing_neg( ) ;
862858 // SAFETY: negation of nonzero cannot yield zero values.
@@ -869,8 +865,6 @@ macro_rules! nonzero_signed_operations {
869865 /// # Example
870866 ///
871867 /// ```
872- /// #![feature(nonzero_negation_ops)]
873- ///
874868 #[ doc = concat!( "# use std::num::" , stringify!( $Ty) , ";" ) ]
875869 /// # fn main() { test().unwrap(); }
876870 /// # fn test() -> Option<()> {
@@ -890,7 +884,8 @@ macro_rules! nonzero_signed_operations {
890884 /// # }
891885 /// ```
892886 #[ inline]
893- #[ unstable( feature = "nonzero_negation_ops" , issue = "102443" ) ]
887+ #[ stable( feature = "nonzero_negation_ops" , since = "CURRENT_RUSTC_VERSION" ) ]
888+ #[ rustc_const_stable( feature = "nonzero_negation_ops" , since = "CURRENT_RUSTC_VERSION" ) ]
894889 pub const fn saturating_neg( self ) -> $Ty {
895890 if let Some ( result) = self . checked_neg( ) {
896891 return result;
@@ -907,8 +902,6 @@ macro_rules! nonzero_signed_operations {
907902 /// # Example
908903 ///
909904 /// ```
910- /// #![feature(nonzero_negation_ops)]
911- ///
912905 #[ doc = concat!( "# use std::num::" , stringify!( $Ty) , ";" ) ]
913906 /// # fn main() { test().unwrap(); }
914907 /// # fn test() -> Option<()> {
@@ -923,7 +916,8 @@ macro_rules! nonzero_signed_operations {
923916 /// # }
924917 /// ```
925918 #[ inline]
926- #[ unstable( feature = "nonzero_negation_ops" , issue = "102443" ) ]
919+ #[ stable( feature = "nonzero_negation_ops" , since = "CURRENT_RUSTC_VERSION" ) ]
920+ #[ rustc_const_stable( feature = "nonzero_negation_ops" , since = "CURRENT_RUSTC_VERSION" ) ]
927921 pub const fn wrapping_neg( self ) -> $Ty {
928922 let result = self . get( ) . wrapping_neg( ) ;
929923 // SAFETY: negation of nonzero cannot yield zero values.
0 commit comments