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.
This commit is contained in:
parent
db034cee00
commit
9d66cfaa08
@ -458,7 +458,15 @@ macro_rules! nonzero_integer {
|
|||||||
reversed = $reversed:literal,
|
reversed = $reversed:literal,
|
||||||
leading_zeros_test = $leading_zeros_test:expr,
|
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.
|
/// This enables some memory layout optimization.
|
||||||
#[doc = concat!("For example, `Option<", stringify!($Ty), ">` is the same size as `", stringify!($Int), "`:")]
|
#[doc = concat!("For example, `Option<", stringify!($Ty), ">` is the same size as `", stringify!($Int), "`:")]
|
||||||
|
Loading…
Reference in New Issue
Block a user