diff options
| author | Mihail Malo <qm3ster@gmail.com> | 2020-06-10 13:55:40 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-10 13:55:40 +0300 |
| commit | 5859f6e4f792afb663ac2dc98191cca08ac9b4ae (patch) | |
| tree | 3f133d7d6c2c345a72bbccf5ff168be94ee8e710 /src/libcore/num | |
| parent | bb8674837a9cc5225020e07fc3f164762bb4c11c (diff) | |
Fix doctest template
`saturating_add` example was not parameterized, but passed because the `u8` would saturate successfully
Diffstat (limited to 'src/libcore/num')
| -rw-r--r-- | src/libcore/num/mod.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs index c164e893b4f..b43994868de 100644 --- a/src/libcore/num/mod.rs +++ b/src/libcore/num/mod.rs @@ -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")] |
