Skip to content

Commit 1d71dc4

Browse files
authored
Rollup merge of #144900 - Kivooeo:unsigned_signed_diff-stabilize, r=dtolnay
Stabilize `unsigned_signed_diff` feature This closes [tracking issue](#126041) and stabilises `checked_signed_diff` Closes: #126041
2 parents 8f51976 + d2cfe48 commit 1d71dc4

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

library/core/src/num/uint_macros.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -844,7 +844,6 @@ macro_rules! uint_impl {
844844
/// # Examples
845845
///
846846
/// ```
847-
/// #![feature(unsigned_signed_diff)]
848847
#[doc = concat!("assert_eq!(10", stringify!($SelfT), ".checked_signed_diff(2), Some(8));")]
849848
#[doc = concat!("assert_eq!(2", stringify!($SelfT), ".checked_signed_diff(10), Some(-8));")]
850849
#[doc = concat!(
@@ -882,7 +881,8 @@ macro_rules! uint_impl {
882881
"::MAX), Some(0));"
883882
)]
884883
/// ```
885-
#[unstable(feature = "unsigned_signed_diff", issue = "126041")]
884+
#[stable(feature = "unsigned_signed_diff", since = "CURRENT_RUSTC_VERSION")]
885+
#[rustc_const_stable(feature = "unsigned_signed_diff", since = "CURRENT_RUSTC_VERSION")]
886886
#[inline]
887887
pub const fn checked_signed_diff(self, rhs: Self) -> Option<$SignedT> {
888888
let res = self.wrapping_sub(rhs) as $SignedT;

library/std/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,6 @@
321321
#![feature(try_blocks)]
322322
#![feature(try_trait_v2)]
323323
#![feature(type_alias_impl_trait)]
324-
#![feature(unsigned_signed_diff)]
325324
// tidy-alphabetical-end
326325
//
327326
// Library features (core):

0 commit comments

Comments
 (0)