@@ -348,7 +348,7 @@ macro_rules! nonzero_unsigned_operations {
348
348
}
349
349
350
350
/// Adds an unsigned integer to a non-zero value.
351
- #[ doc = concat!( "Return [`" , stringify!( $Int ) , "::MAX`] on overflow." ) ]
351
+ #[ doc = concat!( "Return [`" , stringify!( $Ty ) , "::MAX`] on overflow." ) ]
352
352
///
353
353
/// # Examples
354
354
///
@@ -579,7 +579,7 @@ macro_rules! nonzero_signed_operations {
579
579
580
580
/// Checked absolute value.
581
581
/// Checks for overflow and returns [`None`] if
582
- #[ doc = concat!( "`self == " , stringify!( $Int ) , "::MIN`." ) ]
582
+ #[ doc = concat!( "`self == " , stringify!( $Ty ) , "::MIN`." ) ]
583
583
/// The result cannot be zero.
584
584
///
585
585
/// # Example
@@ -800,7 +800,8 @@ macro_rules! nonzero_signed_operations {
800
800
self . get( ) . is_negative( )
801
801
}
802
802
803
- /// Checked negation. Computes `-self`, returning `None` if `self == i32::MIN`.
803
+ /// Checked negation. Computes `-self`,
804
+ #[ doc = concat!( "returning `None` if `self == " , stringify!( $Ty) , "::MIN`." ) ]
804
805
///
805
806
/// # Example
806
807
///
@@ -859,8 +860,10 @@ macro_rules! nonzero_signed_operations {
859
860
( ( unsafe { $Ty:: new_unchecked( result) } ) , overflow)
860
861
}
861
862
862
- /// Saturating negation. Computes `-self`, returning `MAX` if
863
- /// `self == i32::MIN` instead of overflowing.
863
+ /// Saturating negation. Computes `-self`,
864
+ #[ doc = concat!( "returning [`" , stringify!( $Ty) , "::MAX`]" ) ]
865
+ #[ doc = concat!( "if `self == " , stringify!( $Ty) , "::MIN`" ) ]
866
+ /// instead of overflowing.
864
867
///
865
868
/// # Example
866
869
///
@@ -993,7 +996,7 @@ macro_rules! nonzero_unsigned_signed_operations {
993
996
}
994
997
995
998
/// Multiplies two non-zero integers together.
996
- #[ doc = concat!( "Return [`" , stringify!( $Int ) , "::MAX`] on overflow." ) ]
999
+ #[ doc = concat!( "Return [`" , stringify!( $Ty ) , "::MAX`] on overflow." ) ]
997
1000
///
998
1001
/// # Examples
999
1002
///
@@ -1102,11 +1105,11 @@ macro_rules! nonzero_unsigned_signed_operations {
1102
1105
#[ doc = sign_dependent_expr!{
1103
1106
$signedness ?
1104
1107
if signed {
1105
- concat!( "Return [`" , stringify!( $Int ) , "::MIN`] " ,
1106
- "or [`" , stringify!( $Int ) , "::MAX`] on overflow." )
1108
+ concat!( "Return [`" , stringify!( $Ty ) , "::MIN`] " ,
1109
+ "or [`" , stringify!( $Ty ) , "::MAX`] on overflow." )
1107
1110
}
1108
1111
if unsigned {
1109
- concat!( "Return [`" , stringify!( $Int ) , "::MAX`] on overflow." )
1112
+ concat!( "Return [`" , stringify!( $Ty ) , "::MAX`] on overflow." )
1110
1113
}
1111
1114
} ]
1112
1115
///
0 commit comments