Skip to content

Commit 369e449

Browse files
authored
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.
2 parents 736c675 + 00bf999 commit 369e449

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/core/src/num/nonzero.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,7 @@ macro_rules! nonzero_signed_operations {
659659
#[doc = concat!("let neg = ", stringify!($Ty), "::new(-1)?;")]
660660
#[doc = concat!("let min = ", stringify!($Ty), "::new(",
661661
stringify!($Int), "::MIN)?;")]
662-
#[doc = concat!("let max = ", stringify!($Ty), "::new(",
662+
#[doc = concat!("# let max = ", stringify!($Ty), "::new(",
663663
stringify!($Int), "::MAX)?;")]
664664
///
665665
/// assert_eq!(pos, pos.wrapping_abs());

0 commit comments

Comments
 (0)