Skip to main content

impl_ct_neg_for_unsigned_nonzero

Macro impl_ct_neg_for_unsigned_nonzero 

Source
macro_rules! impl_ct_neg_for_unsigned_nonzero {
    ( $($nzuint:ident),+ ) => { ... };
}
Expand description

Unfortunately NonZeroU* doesn’t support wrapping_neg for some reason (but NonZeroI* does), even though the wrapping negation of any non-zero integer should also be non-zero.

So we need a special case just for NonZeroU*, at least for now.