From 9a2e7026dcbd84641b05334b5b4b0a4d647944f4 Mon Sep 17 00:00:00 2001 From: Raph Levien Date: Wed, 17 Oct 2018 21:09:55 -0700 Subject: [PATCH] Fix inconsistent documentation I improved the f32 version and made a copy-paste error for f64. --- src/libstd/f32.rs | 2 +- src/libstd/f64.rs | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) 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) } } -- 2.44.0