@@ -756,8 +756,6 @@ macro_rules! nonzero_signed_operations {
756
756
/// # Example
757
757
///
758
758
/// ```
759
- /// #![feature(nonzero_negation_ops)]
760
- ///
761
759
#[ doc = concat!( "# use std::num::" , stringify!( $Ty) , ";" ) ]
762
760
/// # fn main() { test().unwrap(); }
763
761
/// # fn test() -> Option<()> {
@@ -771,7 +769,8 @@ macro_rules! nonzero_signed_operations {
771
769
/// ```
772
770
#[ must_use]
773
771
#[ 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" ) ]
775
774
pub const fn is_positive( self ) -> bool {
776
775
self . get( ) . is_positive( )
777
776
}
@@ -782,8 +781,6 @@ macro_rules! nonzero_signed_operations {
782
781
/// # Example
783
782
///
784
783
/// ```
785
- /// #![feature(nonzero_negation_ops)]
786
- ///
787
784
#[ doc = concat!( "# use std::num::" , stringify!( $Ty) , ";" ) ]
788
785
/// # fn main() { test().unwrap(); }
789
786
/// # fn test() -> Option<()> {
@@ -797,7 +794,8 @@ macro_rules! nonzero_signed_operations {
797
794
/// ```
798
795
#[ must_use]
799
796
#[ 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" ) ]
801
799
pub const fn is_negative( self ) -> bool {
802
800
self . get( ) . is_negative( )
803
801
}
@@ -807,8 +805,6 @@ macro_rules! nonzero_signed_operations {
807
805
/// # Example
808
806
///
809
807
/// ```
810
- /// #![feature(nonzero_negation_ops)]
811
- ///
812
808
#[ doc = concat!( "# use std::num::" , stringify!( $Ty) , ";" ) ]
813
809
/// # fn main() { test().unwrap(); }
814
810
/// # fn test() -> Option<()> {
@@ -823,7 +819,8 @@ macro_rules! nonzero_signed_operations {
823
819
/// # }
824
820
/// ```
825
821
#[ 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" ) ]
827
824
pub const fn checked_neg( self ) -> Option <$Ty> {
828
825
if let Some ( result) = self . get( ) . checked_neg( ) {
829
826
// SAFETY: negation of nonzero cannot yield zero values.
@@ -840,8 +837,6 @@ macro_rules! nonzero_signed_operations {
840
837
/// # Example
841
838
///
842
839
/// ```
843
- /// #![feature(nonzero_negation_ops)]
844
- ///
845
840
#[ doc = concat!( "# use std::num::" , stringify!( $Ty) , ";" ) ]
846
841
/// # fn main() { test().unwrap(); }
847
842
/// # fn test() -> Option<()> {
@@ -856,7 +851,8 @@ macro_rules! nonzero_signed_operations {
856
851
/// # }
857
852
/// ```
858
853
#[ 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" ) ]
860
856
pub const fn overflowing_neg( self ) -> ( $Ty, bool ) {
861
857
let ( result, overflow) = self . get( ) . overflowing_neg( ) ;
862
858
// SAFETY: negation of nonzero cannot yield zero values.
@@ -869,8 +865,6 @@ macro_rules! nonzero_signed_operations {
869
865
/// # Example
870
866
///
871
867
/// ```
872
- /// #![feature(nonzero_negation_ops)]
873
- ///
874
868
#[ doc = concat!( "# use std::num::" , stringify!( $Ty) , ";" ) ]
875
869
/// # fn main() { test().unwrap(); }
876
870
/// # fn test() -> Option<()> {
@@ -890,7 +884,8 @@ macro_rules! nonzero_signed_operations {
890
884
/// # }
891
885
/// ```
892
886
#[ 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" ) ]
894
889
pub const fn saturating_neg( self ) -> $Ty {
895
890
if let Some ( result) = self . checked_neg( ) {
896
891
return result;
@@ -907,8 +902,6 @@ macro_rules! nonzero_signed_operations {
907
902
/// # Example
908
903
///
909
904
/// ```
910
- /// #![feature(nonzero_negation_ops)]
911
- ///
912
905
#[ doc = concat!( "# use std::num::" , stringify!( $Ty) , ";" ) ]
913
906
/// # fn main() { test().unwrap(); }
914
907
/// # fn test() -> Option<()> {
@@ -923,7 +916,8 @@ macro_rules! nonzero_signed_operations {
923
916
/// # }
924
917
/// ```
925
918
#[ 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" ) ]
927
921
pub const fn wrapping_neg( self ) -> $Ty {
928
922
let result = self . get( ) . wrapping_neg( ) ;
929
923
// SAFETY: negation of nonzero cannot yield zero values.
0 commit comments