diff --git a/library/core/src/cmp.rs b/library/core/src/cmp.rs index bbb3a3dea435e..47ae1a64190ed 100644 --- a/library/core/src/cmp.rs +++ b/library/core/src/cmp.rs @@ -641,14 +641,12 @@ pub trait Ord: Eq + PartialOrd { /// # Examples /// /// ``` - /// #![feature(clamp)] - /// /// assert!((-3).clamp(-2, 1) == -2); /// assert!(0.clamp(-2, 1) == 0); /// assert!(2.clamp(-2, 1) == 1); /// ``` #[must_use] - #[unstable(feature = "clamp", issue = "44095")] + #[stable(feature = "clamp", since = "1.50.0")] fn clamp(self, min: Self, max: Self) -> Self where Self: Sized, diff --git a/library/std/src/f32.rs b/library/std/src/f32.rs index 2a54b117ff4f8..09a9b184e3a43 100644 --- a/library/std/src/f32.rs +++ b/library/std/src/f32.rs @@ -893,14 +893,13 @@ impl f32 { /// # Examples /// /// ``` - /// #![feature(clamp)] /// assert!((-3.0f32).clamp(-2.0, 1.0) == -2.0); /// assert!((0.0f32).clamp(-2.0, 1.0) == 0.0); /// assert!((2.0f32).clamp(-2.0, 1.0) == 1.0); /// assert!((f32::NAN).clamp(-2.0, 1.0).is_nan()); /// ``` #[must_use = "method returns a new number and does not mutate the original value"] - #[unstable(feature = "clamp", issue = "44095")] + #[stable(feature = "clamp", since = "1.50.0")] #[inline] pub fn clamp(self, min: f32, max: f32) -> f32 { assert!(min <= max); diff --git a/library/std/src/f64.rs b/library/std/src/f64.rs index 363d1a0047613..64bb7cd9fd166 100644 --- a/library/std/src/f64.rs +++ b/library/std/src/f64.rs @@ -895,14 +895,13 @@ impl f64 { /// # Examples /// /// ``` - /// #![feature(clamp)] /// assert!((-3.0f64).clamp(-2.0, 1.0) == -2.0); /// assert!((0.0f64).clamp(-2.0, 1.0) == 0.0); /// assert!((2.0f64).clamp(-2.0, 1.0) == 1.0); /// assert!((f64::NAN).clamp(-2.0, 1.0).is_nan()); /// ``` #[must_use = "method returns a new number and does not mutate the original value"] - #[unstable(feature = "clamp", issue = "44095")] + #[stable(feature = "clamp", since = "1.50.0")] #[inline] pub fn clamp(self, min: f64, max: f64) -> f64 { assert!(min <= max); diff --git a/library/std/src/lib.rs b/library/std/src/lib.rs index db523f05e01a5..d2f36309e2daa 100644 --- a/library/std/src/lib.rs +++ b/library/std/src/lib.rs @@ -235,7 +235,6 @@ #![feature(cfg_target_thread_local)] #![feature(char_error_internals)] #![feature(char_internals)] -#![feature(clamp)] #![feature(concat_idents)] #![feature(const_cstr_unchecked)] #![feature(const_fn_floating_point_arithmetic)]