Stabilize ordering_chaining, closes #37053

This commit is contained in:
Aaron Turon 2017-03-14 21:06:29 -07:00 committed by Alex Crichton
parent 37b38a2f75
commit 48890d4971
1 changed files with 2 additions and 6 deletions

View File

@ -255,8 +255,6 @@ impl Ordering {
/// # Examples
///
/// ```
/// #![feature(ordering_chaining)]
///
/// use std::cmp::Ordering;
///
/// let result = Ordering::Equal.then(Ordering::Less);
@ -278,7 +276,7 @@ impl Ordering {
/// assert_eq!(result, Ordering::Less);
/// ```
#[inline]
#[unstable(feature = "ordering_chaining", issue = "37053")]
#[stable(feature = "ordering_chaining", since = "1.17.0")]
pub fn then(self, other: Ordering) -> Ordering {
match self {
Equal => other,
@ -294,8 +292,6 @@ impl Ordering {
/// # Examples
///
/// ```
/// #![feature(ordering_chaining)]
///
/// use std::cmp::Ordering;
///
/// let result = Ordering::Equal.then_with(|| Ordering::Less);
@ -317,7 +313,7 @@ impl Ordering {
/// assert_eq!(result, Ordering::Less);
/// ```
#[inline]
#[unstable(feature = "ordering_chaining", issue = "37053")]
#[stable(feature = "ordering_chaining", since = "1.17.0")]
pub fn then_with<F: FnOnce() -> Ordering>(self, f: F) -> Ordering {
match self {
Equal => f(),