@@ -719,8 +719,6 @@ macro_rules! nonzero_signed_operations {
719
719
/// # Example
720
720
///
721
721
/// ```
722
- /// #![feature(nonzero_negation_ops)]
723
- ///
724
722
#[ doc = concat!( "# use std::num::" , stringify!( $Ty) , ";" ) ]
725
723
/// # fn main() { test().unwrap(); }
726
724
/// # fn test() -> Option<()> {
@@ -734,7 +732,8 @@ macro_rules! nonzero_signed_operations {
734
732
/// ```
735
733
#[ must_use]
736
734
#[ 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" ) ]
738
737
pub const fn is_positive( self ) -> bool {
739
738
self . get( ) . is_positive( )
740
739
}
@@ -745,8 +744,6 @@ macro_rules! nonzero_signed_operations {
745
744
/// # Example
746
745
///
747
746
/// ```
748
- /// #![feature(nonzero_negation_ops)]
749
- ///
750
747
#[ doc = concat!( "# use std::num::" , stringify!( $Ty) , ";" ) ]
751
748
/// # fn main() { test().unwrap(); }
752
749
/// # fn test() -> Option<()> {
@@ -760,7 +757,8 @@ macro_rules! nonzero_signed_operations {
760
757
/// ```
761
758
#[ must_use]
762
759
#[ 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" ) ]
764
762
pub const fn is_negative( self ) -> bool {
765
763
self . get( ) . is_negative( )
766
764
}
@@ -770,8 +768,6 @@ macro_rules! nonzero_signed_operations {
770
768
/// # Example
771
769
///
772
770
/// ```
773
- /// #![feature(nonzero_negation_ops)]
774
- ///
775
771
#[ doc = concat!( "# use std::num::" , stringify!( $Ty) , ";" ) ]
776
772
/// # fn main() { test().unwrap(); }
777
773
/// # fn test() -> Option<()> {
@@ -786,7 +782,8 @@ macro_rules! nonzero_signed_operations {
786
782
/// # }
787
783
/// ```
788
784
#[ 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" ) ]
790
787
pub const fn checked_neg( self ) -> Option <$Ty> {
791
788
if let Some ( result) = self . get( ) . checked_neg( ) {
792
789
// SAFETY: negation of nonzero cannot yield zero values.
@@ -803,8 +800,6 @@ macro_rules! nonzero_signed_operations {
803
800
/// # Example
804
801
///
805
802
/// ```
806
- /// #![feature(nonzero_negation_ops)]
807
- ///
808
803
#[ doc = concat!( "# use std::num::" , stringify!( $Ty) , ";" ) ]
809
804
/// # fn main() { test().unwrap(); }
810
805
/// # fn test() -> Option<()> {
@@ -819,7 +814,8 @@ macro_rules! nonzero_signed_operations {
819
814
/// # }
820
815
/// ```
821
816
#[ 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" ) ]
823
819
pub const fn overflowing_neg( self ) -> ( $Ty, bool ) {
824
820
let ( result, overflow) = self . get( ) . overflowing_neg( ) ;
825
821
// SAFETY: negation of nonzero cannot yield zero values.
@@ -832,8 +828,6 @@ macro_rules! nonzero_signed_operations {
832
828
/// # Example
833
829
///
834
830
/// ```
835
- /// #![feature(nonzero_negation_ops)]
836
- ///
837
831
#[ doc = concat!( "# use std::num::" , stringify!( $Ty) , ";" ) ]
838
832
/// # fn main() { test().unwrap(); }
839
833
/// # fn test() -> Option<()> {
@@ -853,7 +847,8 @@ macro_rules! nonzero_signed_operations {
853
847
/// # }
854
848
/// ```
855
849
#[ 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" ) ]
857
852
pub const fn saturating_neg( self ) -> $Ty {
858
853
if let Some ( result) = self . checked_neg( ) {
859
854
return result;
@@ -870,8 +865,6 @@ macro_rules! nonzero_signed_operations {
870
865
/// # Example
871
866
///
872
867
/// ```
873
- /// #![feature(nonzero_negation_ops)]
874
- ///
875
868
#[ doc = concat!( "# use std::num::" , stringify!( $Ty) , ";" ) ]
876
869
/// # fn main() { test().unwrap(); }
877
870
/// # fn test() -> Option<()> {
@@ -886,7 +879,8 @@ macro_rules! nonzero_signed_operations {
886
879
/// # }
887
880
/// ```
888
881
#[ 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" ) ]
890
884
pub const fn wrapping_neg( self ) -> $Ty {
891
885
let result = self . get( ) . wrapping_neg( ) ;
892
886
// SAFETY: negation of nonzero cannot yield zero values.
0 commit comments