]> git.lizzy.rs Git - rust.git/commitdiff
Fix inconsistent documentation
authorRaph Levien <raph.levien@gmail.com>
Thu, 18 Oct 2018 04:09:55 +0000 (21:09 -0700)
committerRaph Levien <raph.levien@gmail.com>
Thu, 18 Oct 2018 04:09:55 +0000 (21:09 -0700)
I improved the f32 version and made a copy-paste error for f64.

src/libstd/f32.rs
src/libstd/f64.rs

index 4ae8d2dcf16b09ca2432da8bf3dd948e9875ddab..369745d8189466de6b8958beb3fac8779c7b6b5d 100644 (file)
@@ -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) }
     }
index 3b805d6fa42a61e5ee37ab973bdb6500ba99a60c..df23d62ecfd6b41773af52124169dce3b5a4b537 100644 (file)
@@ -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) }
     }