Skip to content

Commit f8e3771

Browse files
authored
Rollup merge of rust-lang#97908 - iago-lito:stabilize_nonzero_checked_ops_constness, r=scottmcm
Stabilize NonZero* checked operations constness. Partial stabilization for rust-lang#97547 (continued).
2 parents 3fb4a87 + 2339bb2 commit f8e3771

File tree

1 file changed

+26
-26
lines changed

1 file changed

+26
-26
lines changed

library/core/src/num/nonzero.rs

+26-26
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,6 @@ macro_rules! nonzero_unsigned_operations {
316316
/// # Examples
317317
///
318318
/// ```
319-
/// #![feature(nonzero_ops)]
320319
#[doc = concat!("# use std::num::", stringify!($Ty), ";")]
321320
///
322321
/// # fn main() { test().unwrap(); }
@@ -331,7 +330,8 @@ macro_rules! nonzero_unsigned_operations {
331330
/// # Some(())
332331
/// # }
333332
/// ```
334-
#[unstable(feature = "nonzero_ops", issue = "84186")]
333+
#[stable(feature = "nonzero_checked_ops", since = "1.64.0")]
334+
#[rustc_const_stable(feature = "const_nonzero_checked_ops", since = "1.64.0")]
335335
#[must_use = "this returns the result of the operation, \
336336
without modifying the original"]
337337
#[inline]
@@ -351,7 +351,6 @@ macro_rules! nonzero_unsigned_operations {
351351
/// # Examples
352352
///
353353
/// ```
354-
/// #![feature(nonzero_ops)]
355354
#[doc = concat!("# use std::num::", stringify!($Ty), ";")]
356355
///
357356
/// # fn main() { test().unwrap(); }
@@ -366,7 +365,8 @@ macro_rules! nonzero_unsigned_operations {
366365
/// # Some(())
367366
/// # }
368367
/// ```
369-
#[unstable(feature = "nonzero_ops", issue = "84186")]
368+
#[stable(feature = "nonzero_checked_ops", since = "1.64.0")]
369+
#[rustc_const_stable(feature = "const_nonzero_checked_ops", since = "1.64.0")]
370370
#[must_use = "this returns the result of the operation, \
371371
without modifying the original"]
372372
#[inline]
@@ -415,7 +415,6 @@ macro_rules! nonzero_unsigned_operations {
415415
/// # Examples
416416
///
417417
/// ```
418-
/// #![feature(nonzero_ops)]
419418
#[doc = concat!("# use std::num::", stringify!($Ty), ";")]
420419
///
421420
/// # fn main() { test().unwrap(); }
@@ -432,7 +431,8 @@ macro_rules! nonzero_unsigned_operations {
432431
/// # Some(())
433432
/// # }
434433
/// ```
435-
#[unstable(feature = "nonzero_ops", issue = "84186")]
434+
#[stable(feature = "nonzero_checked_ops", since = "1.64.0")]
435+
#[rustc_const_stable(feature = "const_nonzero_checked_ops", since = "1.64.0")]
436436
#[must_use = "this returns the result of the operation, \
437437
without modifying the original"]
438438
#[inline]
@@ -521,7 +521,6 @@ macro_rules! nonzero_signed_operations {
521521
/// # Example
522522
///
523523
/// ```
524-
/// #![feature(nonzero_ops)]
525524
#[doc = concat!("# use std::num::", stringify!($Ty), ";")]
526525
///
527526
/// # fn main() { test().unwrap(); }
@@ -534,7 +533,8 @@ macro_rules! nonzero_signed_operations {
534533
/// # Some(())
535534
/// # }
536535
/// ```
537-
#[unstable(feature = "nonzero_ops", issue = "84186")]
536+
#[stable(feature = "nonzero_checked_ops", since = "1.64.0")]
537+
#[rustc_const_stable(feature = "const_nonzero_checked_ops", since = "1.64.0")]
538538
#[must_use = "this returns the result of the operation, \
539539
without modifying the original"]
540540
#[inline]
@@ -551,7 +551,6 @@ macro_rules! nonzero_signed_operations {
551551
/// # Example
552552
///
553553
/// ```
554-
/// #![feature(nonzero_ops)]
555554
#[doc = concat!("# use std::num::", stringify!($Ty), ";")]
556555
///
557556
/// # fn main() { test().unwrap(); }
@@ -566,7 +565,8 @@ macro_rules! nonzero_signed_operations {
566565
/// # Some(())
567566
/// # }
568567
/// ```
569-
#[unstable(feature = "nonzero_ops", issue = "84186")]
568+
#[stable(feature = "nonzero_checked_ops", since = "1.64.0")]
569+
#[rustc_const_stable(feature = "const_nonzero_checked_ops", since = "1.64.0")]
570570
#[must_use = "this returns the result of the operation, \
571571
without modifying the original"]
572572
#[inline]
@@ -586,7 +586,6 @@ macro_rules! nonzero_signed_operations {
586586
/// # Example
587587
///
588588
/// ```
589-
/// #![feature(nonzero_ops)]
590589
#[doc = concat!("# use std::num::", stringify!($Ty), ";")]
591590
///
592591
/// # fn main() { test().unwrap(); }
@@ -602,7 +601,8 @@ macro_rules! nonzero_signed_operations {
602601
/// # Some(())
603602
/// # }
604603
/// ```
605-
#[unstable(feature = "nonzero_ops", issue = "84186")]
604+
#[stable(feature = "nonzero_checked_ops", since = "1.64.0")]
605+
#[rustc_const_stable(feature = "const_nonzero_checked_ops", since = "1.64.0")]
606606
#[must_use = "this returns the result of the operation, \
607607
without modifying the original"]
608608
#[inline]
@@ -621,7 +621,6 @@ macro_rules! nonzero_signed_operations {
621621
/// # Example
622622
///
623623
/// ```
624-
/// #![feature(nonzero_ops)]
625624
#[doc = concat!("# use std::num::", stringify!($Ty), ";")]
626625
///
627626
/// # fn main() { test().unwrap(); }
@@ -642,7 +641,8 @@ macro_rules! nonzero_signed_operations {
642641
/// # Some(())
643642
/// # }
644643
/// ```
645-
#[unstable(feature = "nonzero_ops", issue = "84186")]
644+
#[stable(feature = "nonzero_checked_ops", since = "1.64.0")]
645+
#[rustc_const_stable(feature = "const_nonzero_checked_ops", since = "1.64.0")]
646646
#[must_use = "this returns the result of the operation, \
647647
without modifying the original"]
648648
#[inline]
@@ -657,7 +657,6 @@ macro_rules! nonzero_signed_operations {
657657
/// # Example
658658
///
659659
/// ```
660-
/// #![feature(nonzero_ops)]
661660
#[doc = concat!("# use std::num::", stringify!($Ty), ";")]
662661
///
663662
/// # fn main() { test().unwrap(); }
@@ -677,7 +676,8 @@ macro_rules! nonzero_signed_operations {
677676
/// # Some(())
678677
/// # }
679678
/// ```
680-
#[unstable(feature = "nonzero_ops", issue = "84186")]
679+
#[stable(feature = "nonzero_checked_ops", since = "1.64.0")]
680+
#[rustc_const_stable(feature = "const_nonzero_checked_ops", since = "1.64.0")]
681681
#[must_use = "this returns the result of the operation, \
682682
without modifying the original"]
683683
#[inline]
@@ -692,7 +692,6 @@ macro_rules! nonzero_signed_operations {
692692
/// # Example
693693
///
694694
/// ```
695-
/// #![feature(nonzero_ops)]
696695
#[doc = concat!("# use std::num::", stringify!($Ty), ";")]
697696
#[doc = concat!("# use std::num::", stringify!($Uty), ";")]
698697
///
@@ -712,7 +711,8 @@ macro_rules! nonzero_signed_operations {
712711
/// # Some(())
713712
/// # }
714713
/// ```
715-
#[unstable(feature = "nonzero_ops", issue = "84186")]
714+
#[stable(feature = "nonzero_checked_ops", since = "1.64.0")]
715+
#[rustc_const_stable(feature = "const_nonzero_checked_ops", since = "1.64.0")]
716716
#[must_use = "this returns the result of the operation, \
717717
without modifying the original"]
718718
#[inline]
@@ -746,7 +746,6 @@ macro_rules! nonzero_unsigned_signed_operations {
746746
/// # Examples
747747
///
748748
/// ```
749-
/// #![feature(nonzero_ops)]
750749
#[doc = concat!("# use std::num::", stringify!($Ty), ";")]
751750
///
752751
/// # fn main() { test().unwrap(); }
@@ -761,7 +760,8 @@ macro_rules! nonzero_unsigned_signed_operations {
761760
/// # Some(())
762761
/// # }
763762
/// ```
764-
#[unstable(feature = "nonzero_ops", issue = "84186")]
763+
#[stable(feature = "nonzero_checked_ops", since = "1.64.0")]
764+
#[rustc_const_stable(feature = "const_nonzero_checked_ops", since = "1.64.0")]
765765
#[must_use = "this returns the result of the operation, \
766766
without modifying the original"]
767767
#[inline]
@@ -782,7 +782,6 @@ macro_rules! nonzero_unsigned_signed_operations {
782782
/// # Examples
783783
///
784784
/// ```
785-
/// #![feature(nonzero_ops)]
786785
#[doc = concat!("# use std::num::", stringify!($Ty), ";")]
787786
///
788787
/// # fn main() { test().unwrap(); }
@@ -797,7 +796,8 @@ macro_rules! nonzero_unsigned_signed_operations {
797796
/// # Some(())
798797
/// # }
799798
/// ```
800-
#[unstable(feature = "nonzero_ops", issue = "84186")]
799+
#[stable(feature = "nonzero_checked_ops", since = "1.64.0")]
800+
#[rustc_const_stable(feature = "const_nonzero_checked_ops", since = "1.64.0")]
801801
#[must_use = "this returns the result of the operation, \
802802
without modifying the original"]
803803
#[inline]
@@ -855,7 +855,6 @@ macro_rules! nonzero_unsigned_signed_operations {
855855
/// # Examples
856856
///
857857
/// ```
858-
/// #![feature(nonzero_ops)]
859858
#[doc = concat!("# use std::num::", stringify!($Ty), ";")]
860859
///
861860
/// # fn main() { test().unwrap(); }
@@ -870,7 +869,8 @@ macro_rules! nonzero_unsigned_signed_operations {
870869
/// # Some(())
871870
/// # }
872871
/// ```
873-
#[unstable(feature = "nonzero_ops", issue = "84186")]
872+
#[stable(feature = "nonzero_checked_ops", since = "1.64.0")]
873+
#[rustc_const_stable(feature = "const_nonzero_checked_ops", since = "1.64.0")]
874874
#[must_use = "this returns the result of the operation, \
875875
without modifying the original"]
876876
#[inline]
@@ -899,7 +899,6 @@ macro_rules! nonzero_unsigned_signed_operations {
899899
/// # Examples
900900
///
901901
/// ```
902-
/// #![feature(nonzero_ops)]
903902
#[doc = concat!("# use std::num::", stringify!($Ty), ";")]
904903
///
905904
/// # fn main() { test().unwrap(); }
@@ -914,7 +913,8 @@ macro_rules! nonzero_unsigned_signed_operations {
914913
/// # Some(())
915914
/// # }
916915
/// ```
917-
#[unstable(feature = "nonzero_ops", issue = "84186")]
916+
#[stable(feature = "nonzero_checked_ops", since = "1.64.0")]
917+
#[rustc_const_stable(feature = "const_nonzero_checked_ops", since = "1.64.0")]
918918
#[must_use = "this returns the result of the operation, \
919919
without modifying the original"]
920920
#[inline]

0 commit comments

Comments
 (0)