]> git.lizzy.rs Git - rust.git/commitdiff
Revert "Fix f64 examples"
authorJacob Kiesel <kieseljake@gmail.com>
Fri, 8 Sep 2017 22:07:15 +0000 (16:07 -0600)
committerJacob Kiesel <kieseljake@gmail.com>
Fri, 8 Sep 2017 22:07:15 +0000 (16:07 -0600)
This reverts commit 576426a05a1a6cb33eece7082d7341b7c6bb5277.

src/libstd/f64.rs

index 0a7176f9cc75e133ec2298b1f768a1d4ed150c24..ab8f2cd2fdfbdbd31107c10d53b314dbf1a200da 100644 (file)
@@ -971,17 +971,15 @@ pub fn atanh(self) -> f64 {
     }
 
     /// Returns max if self is greater than max, and min if self is less than min.
-    /// Otherwise this returns self.  Panics if min > max, min is NaN, or max is NaN.
+    /// Otherwise this returns self.  Panics if min > max, min equals NaN, or max equals NaN.
     ///
     /// # Examples
     ///
     /// ```
-    /// #![feature(clamp)]
-    /// use std::f64::NAN;
     /// assert!((-3.0f64).clamp(-2.0f64, 1.0f64) == -2.0f64);
     /// assert!((0.0f64).clamp(-2.0f64, 1.0f64) == 0.0f64);
     /// assert!((2.0f64).clamp(-2.0f64, 1.0f64) == 1.0f64);
-    /// assert!((NAN).clamp(-2.0f64, 1.0f64).is_nan());
+    /// assert!((NAN).clamp(-2.0f64, 1.0f64) == NAN);
     /// ```
     #[unstable(feature = "clamp", issue = "44095")]
     #[inline]