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**  **After** 
This commit is contained in:
commit
1505997c64
1 changed files with 9 additions and 1 deletions
|
@ -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), "`:")]
|
||||
|
|
Loading…
Add table
Reference in a new issue