From 5398e03704a54e62f06b1f1498d89041c9cc4e25 Mon Sep 17 00:00:00 2001 From: Michal Budzynski Date: Fri, 15 Sep 2017 12:54:03 +0200 Subject: [PATCH] stabilized ord_max_min (fixes #25663) --- src/libcore/cmp.rs | 8 ++------ src/libcore/tests/lib.rs | 1 - 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/libcore/cmp.rs b/src/libcore/cmp.rs index ec6525485f7..6f86f8caad0 100644 --- a/src/libcore/cmp.rs +++ b/src/libcore/cmp.rs @@ -453,12 +453,10 @@ pub trait Ord: Eq + PartialOrd { /// # Examples /// /// ``` - /// #![feature(ord_max_min)] - /// /// assert_eq!(2, 1.max(2)); /// assert_eq!(2, 2.max(2)); /// ``` - #[unstable(feature = "ord_max_min", issue = "25663")] + #[stable(feature = "ord_max_min", since = "1.22.0")] fn max(self, other: Self) -> Self where Self: Sized { if other >= self { other } else { self } @@ -471,12 +469,10 @@ fn max(self, other: Self) -> Self /// # Examples /// /// ``` - /// #![feature(ord_max_min)] - /// /// assert_eq!(1, 1.min(2)); /// assert_eq!(2, 2.min(2)); /// ``` - #[unstable(feature = "ord_max_min", issue = "25663")] + #[stable(feature = "ord_max_min", since = "1.22.0")] fn min(self, other: Self) -> Self where Self: Sized { if self <= other { self } else { other } diff --git a/src/libcore/tests/lib.rs b/src/libcore/tests/lib.rs index ab2022b1824..1ba9d78f9de 100644 --- a/src/libcore/tests/lib.rs +++ b/src/libcore/tests/lib.rs @@ -27,7 +27,6 @@ #![feature(inclusive_range_syntax)] #![feature(iter_rfind)] #![feature(nonzero)] -#![feature(ord_max_min)] #![feature(rand)] #![feature(raw)] #![feature(refcell_replace_swap)] -- 2.44.0