mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-02 15:32:06 +00:00
Rollup merge of #44593 - budziq:stabilize_ord_max_min, r=alexcrichton
stabilized ord_max_min (fixes #25663)
This commit is contained in:
commit
3cc135afa3
@ -453,12 +453,10 @@ pub trait Ord: Eq + PartialOrd<Self> {
|
||||
/// # 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 @@ pub trait Ord: Eq + PartialOrd<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 }
|
||||
|
@ -26,7 +26,6 @@
|
||||
#![feature(inclusive_range_syntax)]
|
||||
#![feature(iter_rfind)]
|
||||
#![feature(nonzero)]
|
||||
#![feature(ord_max_min)]
|
||||
#![feature(rand)]
|
||||
#![feature(raw)]
|
||||
#![feature(refcell_replace_swap)]
|
||||
|
Loading…
Reference in New Issue
Block a user