mirror of https://github.com/rust-lang/rust.git
Add missing comment for f64
This commit is contained in:
parent
73016bb8d4
commit
8d2bdb89c6
|
@ -182,7 +182,8 @@ impl const From<bool> for f32 {
|
||||||
#[stable(feature = "float_from_bool", since = "1.68.0")]
|
#[stable(feature = "float_from_bool", since = "1.68.0")]
|
||||||
#[rustc_const_unstable(feature = "const_num_from_num", issue = "87852")]
|
#[rustc_const_unstable(feature = "const_num_from_num", issue = "87852")]
|
||||||
impl const From<bool> for f64 {
|
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]
|
#[inline]
|
||||||
fn from(small: bool) -> Self {
|
fn from(small: bool) -> Self {
|
||||||
small as u8 as Self
|
small as u8 as Self
|
||||||
|
|
Loading…
Reference in New Issue