Skip to content

Commit

Permalink
Rollup merge of #73208 - qm3ster:patch-1, r=Amanieu
Browse files Browse the repository at this point in the history
Fix doctest template

`saturating_add` example was not parameterized, but passed because the `u8` would saturate successfully
  • Loading branch information
Dylan-DPC committed Jun 11, 2020
2 parents d9cf7a1 + 7dc19b0 commit 822bb9a
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 822bb9a

Please sign in to comment.