diff options
| author | bmoxb <maxoblack@yahoo.com> | 2023-03-09 20:37:04 +0000 |
|---|---|---|
| committer | bmoxb <maxoblack@yahoo.com> | 2023-03-09 20:37:04 +0000 |
| commit | 8d2bdb89c624d58feb0f077de6648787f8e6afbc (patch) | |
| tree | 916c6d7a7eee93a95d0ec15ad61b5be80821e53f | |
| parent | 73016bb8d4a5f20dd07524854d29ff9177ccbe54 (diff) | |
| download | rust-8d2bdb89c624d58feb0f077de6648787f8e6afbc.tar.gz rust-8d2bdb89c624d58feb0f077de6648787f8e6afbc.zip | |
Add missing comment for f64
| -rw-r--r-- | library/core/src/convert/num.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/library/core/src/convert/num.rs b/library/core/src/convert/num.rs index 205fe3d382e..baee008b7ed 100644 --- a/library/core/src/convert/num.rs +++ b/library/core/src/convert/num.rs @@ -182,7 +182,8 @@ impl const From<bool> for f32 { #[stable(feature = "float_from_bool", since = "1.68.0")] #[rustc_const_unstable(feature = "const_num_from_num", issue = "87852")] impl const From<bool> for f64 { - /// Converts `bool` to `f64` losslessly. + /// Converts `bool` to `f64` losslessly. The resulting value is positive + /// `0.0` for `false` and `1.0` for `true` values. #[inline] fn from(small: bool) -> Self { small as u8 as Self |
