Skip to content

Commit

Permalink
Fix doctest template
Browse files Browse the repository at this point in the history
`saturating_add` example was not parameterized, but passed because the `u8` would saturate successfully
  • Loading branch information
qm3ster authored Jun 10, 2020
1 parent bb86748 commit 5859f6e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/libcore/num/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3309,7 +3309,8 @@ Basic usage:
```
", $Feature, "assert_eq!(100", stringify!($SelfT), ".saturating_add(1), 101);
assert_eq!(200u8.saturating_add(127), 255);", $EndFeature, "
assert_eq!((", stringify!($SelfT), "::MAX).saturating_add(127), ", stringify!($SelfT),
"::MAX);", $EndFeature, "
```"),

#[stable(feature = "rust1", since = "1.0.0")]
Expand Down

0 comments on commit 5859f6e

Please sign in to comment.