Rollup merge of #104420 - TethysSvensson:master, r=JohnTitor
Fix doc example for `wrapping_abs` The `max` variable is unused. This change introduces the `min_plus` variable, to make the example similar to the one from `saturating_abs`. An alternative would be to remove the unused variable.
This commit is contained in:
commit
369e44943f
@ -659,7 +659,7 @@ macro_rules! nonzero_signed_operations {
|
|||||||
#[doc = concat!("let neg = ", stringify!($Ty), "::new(-1)?;")]
|
#[doc = concat!("let neg = ", stringify!($Ty), "::new(-1)?;")]
|
||||||
#[doc = concat!("let min = ", stringify!($Ty), "::new(",
|
#[doc = concat!("let min = ", stringify!($Ty), "::new(",
|
||||||
stringify!($Int), "::MIN)?;")]
|
stringify!($Int), "::MIN)?;")]
|
||||||
#[doc = concat!("let max = ", stringify!($Ty), "::new(",
|
#[doc = concat!("# let max = ", stringify!($Ty), "::new(",
|
||||||
stringify!($Int), "::MAX)?;")]
|
stringify!($Int), "::MAX)?;")]
|
||||||
///
|
///
|
||||||
/// assert_eq!(pos, pos.wrapping_abs());
|
/// assert_eq!(pos, pos.wrapping_abs());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user