diff options
| author | bors <bors@rust-lang.org> | 2018-12-08 03:50:16 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-12-08 03:50:16 +0000 |
| commit | 059e6a6f57f4e80d527a3cd8a8afe7f51f01af8e (patch) | |
| tree | 90e0d7a855be8202279b6bdde6cbdc95d834f07a /src/libcore/num/mod.rs | |
| parent | 0a7798079608b4ff014471ae64b6c8201aa59cdf (diff) | |
| parent | 003c5b796eae78c8c260bfddfc332a69926a6152 (diff) | |
| download | rust-059e6a6f57f4e80d527a3cd8a8afe7f51f01af8e.tar.gz rust-059e6a6f57f4e80d527a3cd8a8afe7f51f01af8e.zip | |
Auto merge of #56578 - alexreg:cosmetic-1, r=alexreg
Various minor/cosmetic improvements to code r? @Centril 😄
Diffstat (limited to 'src/libcore/num/mod.rs')
| -rw-r--r-- | src/libcore/num/mod.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs index 7f5d596b220..13b422162f3 100644 --- a/src/libcore/num/mod.rs +++ b/src/libcore/num/mod.rs @@ -1544,7 +1544,7 @@ assert_eq!(", stringify!($SelfT), "::MIN.overflowing_mod_euc(-1), (0, true)); concat!("Negates self, overflowing if this is equal to the minimum value. Returns a tuple of the negated version of self along with a boolean indicating whether an overflow -happened. If `self` is the minimum value (e.g. `i32::MIN` for values of type `i32`), then the +happened. If `self` is the minimum value (e.g., `i32::MIN` for values of type `i32`), then the minimum value will be returned again and `true` will be returned for an overflow happening. # Examples @@ -1621,7 +1621,7 @@ $EndFeature, " concat!("Computes the absolute value of `self`. Returns a tuple of the absolute version of self along with a boolean indicating whether an overflow -happened. If self is the minimum value (e.g. ", stringify!($SelfT), "::MIN for values of type +happened. If self is the minimum value (e.g., ", stringify!($SelfT), "::MIN for values of type ", stringify!($SelfT), "), then the minimum value will be returned again and true will be returned for an overflow happening. @@ -3617,7 +3617,7 @@ assert!(!10", stringify!($SelfT), ".is_power_of_two());", $EndFeature, " doc_comment! { concat!("Returns the smallest power of two greater than or equal to `self`. -When return value overflows (i.e. `self > (1 << (N-1))` for type +When return value overflows (i.e., `self > (1 << (N-1))` for type `uN`), it panics in debug mode and return value is wrapped to 0 in release mode (the only situation in which method can return 0). @@ -4827,7 +4827,7 @@ fn from_str_radix<T: FromStrRadixHelper>(src: &str, radix: u32) -> Result<T, Par /// # Potential causes /// /// Among other causes, `ParseIntError` can be thrown because of leading or trailing whitespace -/// in the string e.g. when it is obtained from the standard input. +/// in the string e.g., when it is obtained from the standard input. /// Using the [`str.trim()`] method ensures that no whitespace remains before parsing. /// /// [`str.trim()`]: ../../std/primitive.str.html#method.trim |
