Skip to content

Commit

Permalink
Rollup merge of #104420 - TethysSvensson:master, r=JohnTitor
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
matthiaskrgr authored Nov 21, 2022
2 parents 736c675 + 00bf999 commit 369e449
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/core/src/num/nonzero.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit 369e449

Please sign in to comment.