Skip to content

Commit ad57d5f

Browse files
authored
Rollup merge of #101555 - jhpratt:stabilize-mixed_integer_ops, r=joshtriplett
Stabilize `#![feature(mixed_integer_ops)]` Tracked and FCP completed in #87840. ````@rustbot```` label +T-libs-api +S-waiting-on-review +relnotes r? rust-lang/t-libs-api
2 parents 57ee5cf + 5510a69 commit ad57d5f

File tree

4 files changed

+24
-38
lines changed

4 files changed

+24
-38
lines changed

library/core/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,6 @@
195195
#![feature(link_llvm_intrinsics)]
196196
#![feature(macro_metavar_expr)]
197197
#![feature(min_specialization)]
198-
#![feature(mixed_integer_ops)]
199198
#![feature(must_not_suspend)]
200199
#![feature(negative_impls)]
201200
#![feature(never_type)]

library/core/src/num/int_macros.rs

+16-24
Original file line numberDiff line numberDiff line change
@@ -464,12 +464,11 @@ macro_rules! int_impl {
464464
/// Basic usage:
465465
///
466466
/// ```
467-
/// # #![feature(mixed_integer_ops)]
468467
#[doc = concat!("assert_eq!(1", stringify!($SelfT), ".checked_add_unsigned(2), Some(3));")]
469468
#[doc = concat!("assert_eq!((", stringify!($SelfT), "::MAX - 2).checked_add_unsigned(3), None);")]
470469
/// ```
471-
#[unstable(feature = "mixed_integer_ops", issue = "87840")]
472-
#[rustc_const_unstable(feature = "mixed_integer_ops", issue = "87840")]
470+
#[stable(feature = "mixed_integer_ops", since = "CURRENT_RUSTC_VERSION")]
471+
#[rustc_const_stable(feature = "mixed_integer_ops", since = "CURRENT_RUSTC_VERSION")]
473472
#[must_use = "this returns the result of the operation, \
474473
without modifying the original"]
475474
#[inline]
@@ -533,12 +532,11 @@ macro_rules! int_impl {
533532
/// Basic usage:
534533
///
535534
/// ```
536-
/// # #![feature(mixed_integer_ops)]
537535
#[doc = concat!("assert_eq!(1", stringify!($SelfT), ".checked_sub_unsigned(2), Some(-1));")]
538536
#[doc = concat!("assert_eq!((", stringify!($SelfT), "::MIN + 2).checked_sub_unsigned(3), None);")]
539537
/// ```
540-
#[unstable(feature = "mixed_integer_ops", issue = "87840")]
541-
#[rustc_const_unstable(feature = "mixed_integer_ops", issue = "87840")]
538+
#[stable(feature = "mixed_integer_ops", since = "CURRENT_RUSTC_VERSION")]
539+
#[rustc_const_stable(feature = "mixed_integer_ops", since = "CURRENT_RUSTC_VERSION")]
542540
#[must_use = "this returns the result of the operation, \
543541
without modifying the original"]
544542
#[inline]
@@ -907,12 +905,11 @@ macro_rules! int_impl {
907905
/// Basic usage:
908906
///
909907
/// ```
910-
/// # #![feature(mixed_integer_ops)]
911908
#[doc = concat!("assert_eq!(1", stringify!($SelfT), ".saturating_add_unsigned(2), 3);")]
912909
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MAX.saturating_add_unsigned(100), ", stringify!($SelfT), "::MAX);")]
913910
/// ```
914-
#[unstable(feature = "mixed_integer_ops", issue = "87840")]
915-
#[rustc_const_unstable(feature = "mixed_integer_ops", issue = "87840")]
911+
#[stable(feature = "mixed_integer_ops", since = "CURRENT_RUSTC_VERSION")]
912+
#[rustc_const_stable(feature = "mixed_integer_ops", since = "CURRENT_RUSTC_VERSION")]
916913
#[must_use = "this returns the result of the operation, \
917914
without modifying the original"]
918915
#[inline]
@@ -954,12 +951,11 @@ macro_rules! int_impl {
954951
/// Basic usage:
955952
///
956953
/// ```
957-
/// # #![feature(mixed_integer_ops)]
958954
#[doc = concat!("assert_eq!(100", stringify!($SelfT), ".saturating_sub_unsigned(127), -27);")]
959955
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MIN.saturating_sub_unsigned(100), ", stringify!($SelfT), "::MIN);")]
960956
/// ```
961-
#[unstable(feature = "mixed_integer_ops", issue = "87840")]
962-
#[rustc_const_unstable(feature = "mixed_integer_ops", issue = "87840")]
957+
#[stable(feature = "mixed_integer_ops", since = "CURRENT_RUSTC_VERSION")]
958+
#[rustc_const_stable(feature = "mixed_integer_ops", since = "CURRENT_RUSTC_VERSION")]
963959
#[must_use = "this returns the result of the operation, \
964960
without modifying the original"]
965961
#[inline]
@@ -1135,12 +1131,11 @@ macro_rules! int_impl {
11351131
/// Basic usage:
11361132
///
11371133
/// ```
1138-
/// # #![feature(mixed_integer_ops)]
11391134
#[doc = concat!("assert_eq!(100", stringify!($SelfT), ".wrapping_add_unsigned(27), 127);")]
11401135
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MAX.wrapping_add_unsigned(2), ", stringify!($SelfT), "::MIN + 1);")]
11411136
/// ```
1142-
#[unstable(feature = "mixed_integer_ops", issue = "87840")]
1143-
#[rustc_const_unstable(feature = "mixed_integer_ops", issue = "87840")]
1137+
#[stable(feature = "mixed_integer_ops", since = "CURRENT_RUSTC_VERSION")]
1138+
#[rustc_const_stable(feature = "mixed_integer_ops", since = "CURRENT_RUSTC_VERSION")]
11441139
#[must_use = "this returns the result of the operation, \
11451140
without modifying the original"]
11461141
#[inline(always)]
@@ -1176,12 +1171,11 @@ macro_rules! int_impl {
11761171
/// Basic usage:
11771172
///
11781173
/// ```
1179-
/// # #![feature(mixed_integer_ops)]
11801174
#[doc = concat!("assert_eq!(0", stringify!($SelfT), ".wrapping_sub_unsigned(127), -127);")]
11811175
#[doc = concat!("assert_eq!((-2", stringify!($SelfT), ").wrapping_sub_unsigned(", stringify!($UnsignedT), "::MAX), -1);")]
11821176
/// ```
1183-
#[unstable(feature = "mixed_integer_ops", issue = "87840")]
1184-
#[rustc_const_unstable(feature = "mixed_integer_ops", issue = "87840")]
1177+
#[stable(feature = "mixed_integer_ops", since = "CURRENT_RUSTC_VERSION")]
1178+
#[rustc_const_stable(feature = "mixed_integer_ops", since = "CURRENT_RUSTC_VERSION")]
11851179
#[must_use = "this returns the result of the operation, \
11861180
without modifying the original"]
11871181
#[inline(always)]
@@ -1574,13 +1568,12 @@ macro_rules! int_impl {
15741568
/// Basic usage:
15751569
///
15761570
/// ```
1577-
/// # #![feature(mixed_integer_ops)]
15781571
#[doc = concat!("assert_eq!(1", stringify!($SelfT), ".overflowing_add_unsigned(2), (3, false));")]
15791572
#[doc = concat!("assert_eq!((", stringify!($SelfT), "::MIN).overflowing_add_unsigned(", stringify!($UnsignedT), "::MAX), (", stringify!($SelfT), "::MAX, false));")]
15801573
#[doc = concat!("assert_eq!((", stringify!($SelfT), "::MAX - 2).overflowing_add_unsigned(3), (", stringify!($SelfT), "::MIN, true));")]
15811574
/// ```
1582-
#[unstable(feature = "mixed_integer_ops", issue = "87840")]
1583-
#[rustc_const_unstable(feature = "mixed_integer_ops", issue = "87840")]
1575+
#[stable(feature = "mixed_integer_ops", since = "CURRENT_RUSTC_VERSION")]
1576+
#[rustc_const_stable(feature = "mixed_integer_ops", since = "CURRENT_RUSTC_VERSION")]
15841577
#[must_use = "this returns the result of the operation, \
15851578
without modifying the original"]
15861579
#[inline]
@@ -1658,13 +1651,12 @@ macro_rules! int_impl {
16581651
/// Basic usage:
16591652
///
16601653
/// ```
1661-
/// # #![feature(mixed_integer_ops)]
16621654
#[doc = concat!("assert_eq!(1", stringify!($SelfT), ".overflowing_sub_unsigned(2), (-1, false));")]
16631655
#[doc = concat!("assert_eq!((", stringify!($SelfT), "::MAX).overflowing_sub_unsigned(", stringify!($UnsignedT), "::MAX), (", stringify!($SelfT), "::MIN, false));")]
16641656
#[doc = concat!("assert_eq!((", stringify!($SelfT), "::MIN + 2).overflowing_sub_unsigned(3), (", stringify!($SelfT), "::MAX, true));")]
16651657
/// ```
1666-
#[unstable(feature = "mixed_integer_ops", issue = "87840")]
1667-
#[rustc_const_unstable(feature = "mixed_integer_ops", issue = "87840")]
1658+
#[stable(feature = "mixed_integer_ops", since = "CURRENT_RUSTC_VERSION")]
1659+
#[rustc_const_stable(feature = "mixed_integer_ops", since = "CURRENT_RUSTC_VERSION")]
16681660
#[must_use = "this returns the result of the operation, \
16691661
without modifying the original"]
16701662
#[inline]

library/core/src/num/uint_macros.rs

+8-12
Original file line numberDiff line numberDiff line change
@@ -474,13 +474,12 @@ macro_rules! uint_impl {
474474
/// Basic usage:
475475
///
476476
/// ```
477-
/// # #![feature(mixed_integer_ops)]
478477
#[doc = concat!("assert_eq!(1", stringify!($SelfT), ".checked_add_signed(2), Some(3));")]
479478
#[doc = concat!("assert_eq!(1", stringify!($SelfT), ".checked_add_signed(-2), None);")]
480479
#[doc = concat!("assert_eq!((", stringify!($SelfT), "::MAX - 2).checked_add_signed(3), None);")]
481480
/// ```
482-
#[unstable(feature = "mixed_integer_ops", issue = "87840")]
483-
#[rustc_const_unstable(feature = "mixed_integer_ops", issue = "87840")]
481+
#[stable(feature = "mixed_integer_ops", since = "CURRENT_RUSTC_VERSION")]
482+
#[rustc_const_stable(feature = "mixed_integer_ops", since = "CURRENT_RUSTC_VERSION")]
484483
#[must_use = "this returns the result of the operation, \
485484
without modifying the original"]
486485
#[inline]
@@ -1057,13 +1056,12 @@ macro_rules! uint_impl {
10571056
/// Basic usage:
10581057
///
10591058
/// ```
1060-
/// # #![feature(mixed_integer_ops)]
10611059
#[doc = concat!("assert_eq!(1", stringify!($SelfT), ".saturating_add_signed(2), 3);")]
10621060
#[doc = concat!("assert_eq!(1", stringify!($SelfT), ".saturating_add_signed(-2), 0);")]
10631061
#[doc = concat!("assert_eq!((", stringify!($SelfT), "::MAX - 2).saturating_add_signed(4), ", stringify!($SelfT), "::MAX);")]
10641062
/// ```
1065-
#[unstable(feature = "mixed_integer_ops", issue = "87840")]
1066-
#[rustc_const_unstable(feature = "mixed_integer_ops", issue = "87840")]
1063+
#[stable(feature = "mixed_integer_ops", since = "CURRENT_RUSTC_VERSION")]
1064+
#[rustc_const_stable(feature = "mixed_integer_ops", since = "CURRENT_RUSTC_VERSION")]
10671065
#[must_use = "this returns the result of the operation, \
10681066
without modifying the original"]
10691067
#[inline]
@@ -1198,13 +1196,12 @@ macro_rules! uint_impl {
11981196
/// Basic usage:
11991197
///
12001198
/// ```
1201-
/// # #![feature(mixed_integer_ops)]
12021199
#[doc = concat!("assert_eq!(1", stringify!($SelfT), ".wrapping_add_signed(2), 3);")]
12031200
#[doc = concat!("assert_eq!(1", stringify!($SelfT), ".wrapping_add_signed(-2), ", stringify!($SelfT), "::MAX);")]
12041201
#[doc = concat!("assert_eq!((", stringify!($SelfT), "::MAX - 2).wrapping_add_signed(4), 1);")]
12051202
/// ```
1206-
#[unstable(feature = "mixed_integer_ops", issue = "87840")]
1207-
#[rustc_const_unstable(feature = "mixed_integer_ops", issue = "87840")]
1203+
#[stable(feature = "mixed_integer_ops", since = "CURRENT_RUSTC_VERSION")]
1204+
#[rustc_const_stable(feature = "mixed_integer_ops", since = "CURRENT_RUSTC_VERSION")]
12081205
#[must_use = "this returns the result of the operation, \
12091206
without modifying the original"]
12101207
#[inline]
@@ -1564,13 +1561,12 @@ macro_rules! uint_impl {
15641561
/// Basic usage:
15651562
///
15661563
/// ```
1567-
/// # #![feature(mixed_integer_ops)]
15681564
#[doc = concat!("assert_eq!(1", stringify!($SelfT), ".overflowing_add_signed(2), (3, false));")]
15691565
#[doc = concat!("assert_eq!(1", stringify!($SelfT), ".overflowing_add_signed(-2), (", stringify!($SelfT), "::MAX, true));")]
15701566
#[doc = concat!("assert_eq!((", stringify!($SelfT), "::MAX - 2).overflowing_add_signed(4), (1, true));")]
15711567
/// ```
1572-
#[unstable(feature = "mixed_integer_ops", issue = "87840")]
1573-
#[rustc_const_unstable(feature = "mixed_integer_ops", issue = "87840")]
1568+
#[stable(feature = "mixed_integer_ops", since = "CURRENT_RUSTC_VERSION")]
1569+
#[rustc_const_stable(feature = "mixed_integer_ops", since = "CURRENT_RUSTC_VERSION")]
15741570
#[must_use = "this returns the result of the operation, \
15751571
without modifying the original"]
15761572
#[inline]

library/std/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,6 @@
294294
#![feature(is_some_with)]
295295
#![feature(maybe_uninit_slice)]
296296
#![feature(maybe_uninit_write_slice)]
297-
#![feature(mixed_integer_ops)]
298297
#![feature(nonnull_slice_from_raw_parts)]
299298
#![feature(panic_can_unwind)]
300299
#![feature(panic_info_message)]

0 commit comments

Comments
 (0)