Rollup merge of #147562 - tyilo:stabilize-unsigned_nonzero_div_ceil, r=joboet

Stabilize `NonZero<u*>::div_ceil`

As per https://github.com/rust-lang/rust/issues/132968#issuecomment-3390765077

r? libs
This commit is contained in:
dianqk 2025-10-11 07:06:01 +08:00 committed by GitHub
commit ab7d63afca
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1373,7 +1373,6 @@ macro_rules! nonzero_integer_signedness_dependent_impls {
/// # Examples
///
/// ```
/// # #![feature(unsigned_nonzero_div_ceil)]
/// # use std::num::NonZero;
#[doc = concat!("let one = NonZero::new(1", stringify!($Int), ").unwrap();")]
#[doc = concat!("let max = NonZero::new(", stringify!($Int), "::MAX).unwrap();")]
@ -1383,7 +1382,11 @@ macro_rules! nonzero_integer_signedness_dependent_impls {
#[doc = concat!("let three = NonZero::new(3", stringify!($Int), ").unwrap();")]
/// assert_eq!(three.div_ceil(two), two);
/// ```
#[unstable(feature = "unsigned_nonzero_div_ceil", issue = "132968")]
#[stable(feature = "unsigned_nonzero_div_ceil", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(
feature = "unsigned_nonzero_div_ceil",
since = "CURRENT_RUSTC_VERSION"
)]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]