Rollup merge of #132563 - frectonz:master, r=Amanieu

Modify `NonZero` documentation to reference the underlying integer type

This change updates the documentation for `NonZero` integer types to explicitly reference the underlying integer type each `NonZero` variant wraps, instead of  using a general "integer" term.

**Before**
![image](https://github.com/user-attachments/assets/b13bda82-007b-459c-8b22-e27d79005271)

**After**
![image](https://github.com/user-attachments/assets/1d7fadc7-dce3-4b84-9b8f-d2bb81c05eb7)
This commit is contained in:
Jubilee 2024-11-03 15:24:59 -08:00 committed by GitHub
commit 1505997c64
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -472,7 +472,15 @@ macro_rules! nonzero_integer {
reversed = $reversed:literal,
leading_zeros_test = $leading_zeros_test:expr,
) => {
/// An integer that is known not to equal zero.
#[doc = sign_dependent_expr!{
$signedness ?
if signed {
concat!("An [`", stringify!($Int), "`] that is known not to equal zero.")
}
if unsigned {
concat!("A [`", stringify!($Int), "`] that is known not to equal zero.")
}
}]
///
/// This enables some memory layout optimization.
#[doc = concat!("For example, `Option<", stringify!($Ty), ">` is the same size as `", stringify!($Int), "`:")]