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:
Matthias Krüger 2022-11-21 14:11:09 +01:00 committed by GitHub
commit 369e44943f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -659,7 +659,7 @@ macro_rules! nonzero_signed_operations {
#[doc = concat!("let neg = ", stringify!($Ty), "::new(-1)?;")]
#[doc = concat!("let min = ", stringify!($Ty), "::new(",
stringify!($Int), "::MIN)?;")]
#[doc = concat!("let max = ", stringify!($Ty), "::new(",
#[doc = concat!("# let max = ", stringify!($Ty), "::new(",
stringify!($Int), "::MAX)?;")]
///
/// assert_eq!(pos, pos.wrapping_abs());