]> git.lizzy.rs Git - rust.git/commitdiff
add feature clamp
authorDirk Leifeld <leifeld@posteo.de>
Sat, 9 Mar 2019 19:10:48 +0000 (20:10 +0100)
committerDirk Leifeld <leifeld@posteo.de>
Sat, 9 Mar 2019 19:10:48 +0000 (20:10 +0100)
src/libstd/f32.rs
src/libstd/f64.rs
src/libstd/lib.rs

index df4dc2c7791257ff54f87d0d90c62729ba6b9393..d158a6a5bccc86a4dd7097ed36707ae597059b70 100644 (file)
@@ -962,6 +962,7 @@ pub fn atanh(self) -> f32 {
     /// # Examples
     ///
     /// ```
+    /// #![feature(clamp)]
     /// 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);
index 00e7f27912817cabe0f57d37e5bbfc82f466d4f2..5be0cfa9b8f0ad7d19f1ec6a71fd424a5765f876 100644 (file)
@@ -884,6 +884,7 @@ pub fn atanh(self) -> f64 {
     /// # Examples
     ///
     /// ```
+    /// #![feature(clamp)]
     /// 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);
index 6dd3a6cc0fdbd45422c3ee8463dad5d099317d06..1c4918de42882ef408138e5533e2c9f1ae4fe3b9 100644 (file)
 #![feature(cfg_target_thread_local)]
 #![feature(char_error_internals)]
 #![feature(checked_duration_since)]
+#![feature(clamp)]
 #![feature(compiler_builtins_lib)]
 #![feature(concat_idents)]
 #![feature(const_cstr_unchecked)]