Skip to content

Commit 12249ac

Browse files
committed
Stabilize nonzero_leading_trailing_zeros
1 parent 2d99a86 commit 12249ac

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

library/core/src/num/nonzero.rs

+4-6
Original file line numberDiff line numberDiff line change
@@ -191,13 +191,12 @@ macro_rules! nonzero_leading_trailing_zeros {
191191
/// Basic usage:
192192
///
193193
/// ```
194-
/// #![feature(nonzero_leading_trailing_zeros)]
195194
#[doc = concat!("let n = std::num::", stringify!($Ty), "::new(", stringify!($LeadingTestExpr), ").unwrap();")]
196195
///
197196
/// assert_eq!(n.leading_zeros(), 0);
198197
/// ```
199-
#[unstable(feature = "nonzero_leading_trailing_zeros", issue = "79143")]
200-
#[rustc_const_unstable(feature = "nonzero_leading_trailing_zeros", issue = "79143")]
198+
#[stable(feature = "nonzero_leading_trailing_zeros", since = "1.53.0")]
199+
#[rustc_const_stable(feature = "nonzero_leading_trailing_zeros", since = "1.53.0")]
201200
#[inline]
202201
pub const fn leading_zeros(self) -> u32 {
203202
// SAFETY: since `self` can not be zero it is safe to call ctlz_nonzero
@@ -214,13 +213,12 @@ macro_rules! nonzero_leading_trailing_zeros {
214213
/// Basic usage:
215214
///
216215
/// ```
217-
/// #![feature(nonzero_leading_trailing_zeros)]
218216
#[doc = concat!("let n = std::num::", stringify!($Ty), "::new(0b0101000).unwrap();")]
219217
///
220218
/// assert_eq!(n.trailing_zeros(), 3);
221219
/// ```
222-
#[unstable(feature = "nonzero_leading_trailing_zeros", issue = "79143")]
223-
#[rustc_const_unstable(feature = "nonzero_leading_trailing_zeros", issue = "79143")]
220+
#[stable(feature = "nonzero_leading_trailing_zeros", since = "1.53.0")]
221+
#[rustc_const_stable(feature = "nonzero_leading_trailing_zeros", since = "1.53.0")]
224222
#[inline]
225223
pub const fn trailing_zeros(self) -> u32 {
226224
// SAFETY: since `self` can not be zero it is safe to call cttz_nonzero

library/core/tests/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@
6969
#![feature(ptr_metadata)]
7070
#![feature(once_cell)]
7171
#![feature(unsized_tuple_coercion)]
72-
#![feature(nonzero_leading_trailing_zeros)]
7372
#![feature(const_option)]
7473
#![feature(integer_atomics)]
7574
#![feature(slice_group_by)]

0 commit comments

Comments
 (0)