From: Raph Levien Date: Thu, 18 Oct 2018 04:09:55 +0000 (-0700) Subject: Fix inconsistent documentation X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=9a2e7026dcbd84641b05334b5b4b0a4d647944f4;p=rust.git Fix inconsistent documentation I improved the f32 version and made a copy-paste error for f64. --- diff --git a/src/libstd/f32.rs b/src/libstd/f32.rs index 4ae8d2dcf16..369745d8189 100644 --- a/src/libstd/f32.rs +++ b/src/libstd/f32.rs @@ -221,7 +221,7 @@ pub fn signum(self) -> f32 { /// assert!(f32::NAN.copysign(1.0).is_nan()); /// ``` #[inline] - #[unstable(feature="copysign", issue="0")] + #[unstable(feature="copysign", issue="55169")] pub fn copysign(self, y: f32) -> f32 { unsafe { intrinsics::copysignf32(self, y) } } diff --git a/src/libstd/f64.rs b/src/libstd/f64.rs index 3b805d6fa42..df23d62ecfd 100644 --- a/src/libstd/f64.rs +++ b/src/libstd/f64.rs @@ -177,10 +177,11 @@ pub fn signum(self) -> f64 { } /// Returns a number composed of the magnitude of one number and the sign of - /// another, or `NAN` if the number is `NAN`. + /// another. /// /// Equal to `self` if the sign of `self` and `y` are the same, otherwise - /// equal to `-y`. + /// equal to `-y`. If `self` is a `NAN`, then a `NAN` with the sign of `y` + /// is returned. /// /// # Examples /// @@ -198,7 +199,7 @@ pub fn signum(self) -> f64 { /// assert!(f64::NAN.copysign(1.0).is_nan()); /// ``` #[inline] - #[unstable(feature="copysign", issue="0")] + #[unstable(feature="copysign", issue="55169")] pub fn copysign(self, y: f64) -> f64 { unsafe { intrinsics::copysignf64(self, y) } }