Skip to content

Commit eb57d3a

Browse files
committed
Stabilize unchecked nonzero_ops
The original `nonzero_ops` feature (#84186) was partly stabilized as `nonzero_checked_ops`, leaving the `NonZero::unchecked_{add,mul}` operations feature-gated until their primitive counterparts (`{i,u}*::unchecked_{add,mul}`) were stabilized. The latter operations were (const) stabilized in 1.79, but the unchecked `NonZero` operations have stayed in limbo until now.
1 parent 2834d57 commit eb57d3a

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

‎library/core/src/num/nonzero.rs‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1289,8 +1289,6 @@ macro_rules! nonzero_integer {
12891289
/// # Examples
12901290
///
12911291
/// ```
1292-
/// #![feature(nonzero_ops)]
1293-
///
12941292
/// # use std::num::NonZero;
12951293
/// #
12961294
/// # fn main() { test().unwrap(); }
@@ -1302,7 +1300,8 @@ macro_rules! nonzero_integer {
13021300
/// # Some(())
13031301
/// # }
13041302
/// ```
1305-
#[unstable(feature = "nonzero_ops", issue = "84186")]
1303+
#[stable(feature = "nonzero_ops", since = "CURRENT_RUSTC_VERSION")]
1304+
#[rustc_const_stable(feature = "const_nonzero_ops", since = "CURRENT_RUSTC_VERSION")]
13061305
#[must_use = "this returns the result of the operation, \
13071306
without modifying the original"]
13081307
#[inline]
@@ -1877,8 +1876,6 @@ macro_rules! nonzero_integer_signedness_dependent_methods {
18771876
/// # Examples
18781877
///
18791878
/// ```
1880-
/// #![feature(nonzero_ops)]
1881-
///
18821879
/// # use std::num::NonZero;
18831880
/// #
18841881
/// # fn main() { test().unwrap(); }
@@ -1890,7 +1887,8 @@ macro_rules! nonzero_integer_signedness_dependent_methods {
18901887
/// # Some(())
18911888
/// # }
18921889
/// ```
1893-
#[unstable(feature = "nonzero_ops", issue = "84186")]
1890+
#[stable(feature = "nonzero_ops", since = "CURRENT_RUSTC_VERSION")]
1891+
#[rustc_const_stable(feature = "const_nonzero_ops", since = "CURRENT_RUSTC_VERSION")]
18941892
#[must_use = "this returns the result of the operation, \
18951893
without modifying the original"]
18961894
#[inline]

0 commit comments

Comments
 (0)