Rollup merge of #136663 - WaffleLapkin:count-non-zero-ones, r=cuviper

Stabilize `NonZero::count_ones`

As per https://github.com/rust-lang/rust/issues/120287#issuecomment-2639187140

r? libs
This commit is contained in:
Jacob Pratt
2025-02-11 01:02:38 -05:00
committed by GitHub

View File

@@ -612,8 +612,6 @@ macro_rules! nonzero_integer {
/// Basic usage: /// Basic usage:
/// ///
/// ``` /// ```
/// #![feature(non_zero_count_ones)]
///
/// # use std::num::NonZero; /// # use std::num::NonZero;
/// # /// #
/// # fn main() { test().unwrap(); } /// # fn main() { test().unwrap(); }
@@ -627,7 +625,8 @@ macro_rules! nonzero_integer {
/// # } /// # }
/// ``` /// ```
/// ///
#[unstable(feature = "non_zero_count_ones", issue = "120287")] #[stable(feature = "non_zero_count_ones", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "non_zero_count_ones", since = "CURRENT_RUSTC_VERSION")]
#[doc(alias = "popcount")] #[doc(alias = "popcount")]
#[doc(alias = "popcnt")] #[doc(alias = "popcnt")]
#[must_use = "this returns the result of the operation, \ #[must_use = "this returns the result of the operation, \