about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorJacob Kiesel <kieseljake@gmail.com>2017-09-08 16:07:17 -0600
committerJacob Kiesel <kieseljake@gmail.com>2017-09-08 16:07:17 -0600
commiteafdad511ff46e82b3e4c1c60b6fa843a33ee0f4 (patch)
tree7278b112af4f8707e55008bc0b2d3940ea67dd30 /src/libstd
parent15d3eeaf65692e5ad2313c605906eb65f6c8fe3c (diff)
downloadrust-eafdad511ff46e82b3e4c1c60b6fa843a33ee0f4.tar.gz
rust-eafdad511ff46e82b3e4c1c60b6fa843a33ee0f4.zip
Revert "Fix f32 examples."
This reverts commit 61f20f8df02e53ee60dc1719ce0e502eecebf8b4.
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/f32.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/libstd/f32.rs b/src/libstd/f32.rs
index 6b6bd39e7e8..cef53671e80 100644
--- a/src/libstd/f32.rs
+++ b/src/libstd/f32.rs
@@ -1081,17 +1081,15 @@ impl f32 {
     }
 
     /// 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::f32::NAN;
     /// assert!((-3.0f32).clamp(-2.0f32, 1.0f32) == -2.0f32);
     /// assert!((0.0f32).clamp(-2.0f32, 1.0f32) == 0.0f32);
     /// assert!((2.0f32).clamp(-2.0f32, 1.0f32) == 1.0f32);
-    /// assert!((NAN).clamp(-2.0f32, 1.0f32).is_nan());
+    /// assert!((NAN).clamp(-2.0f32, 1.0f32) == NAN);
     /// ```
     #[unstable(feature = "clamp", issue = "44095")]
     #[inline]