@@ -330,25 +330,26 @@ impl Ordering {
330
330
/// Example usage:
331
331
///
332
332
/// ```
333
+ /// #![feature(reverse_cmp_key)]
333
334
/// use std::cmp::Reverse;
334
335
///
335
336
/// let mut v = vec![1, 2, 3, 4, 5, 6];
336
337
/// v.sort_by_key(|&num| (num > 3, Reverse(num)));
337
338
/// assert_eq!(v, vec![3, 2, 1, 6, 5, 4]);
338
339
/// ```
339
340
#[ derive( PartialEq , Eq , Debug ) ]
340
- #[ stable ( feature = "rust1 " , since = "1.18.0 " ) ]
341
+ #[ unstable ( feature = "reverse_cmp_key " , issue = "40720 " ) ]
341
342
pub struct Reverse < T > ( pub T ) ;
342
343
343
- #[ stable ( feature = "rust1 " , since = "1.18.0 " ) ]
344
+ #[ unstable ( feature = "reverse_cmp_key " , issue = "40720 " ) ]
344
345
impl < T : PartialOrd > PartialOrd for Reverse < T > {
345
346
#[ inline]
346
347
fn partial_cmp ( & self , other : & Reverse < T > ) -> Option < Ordering > {
347
348
other. 0 . partial_cmp ( & self . 0 )
348
349
}
349
350
}
350
351
351
- #[ stable ( feature = "rust1 " , since = "1.18.0 " ) ]
352
+ #[ unstable ( feature = "reverse_cmp_key " , issue = "40720 " ) ]
352
353
impl < T : Ord > Ord for Reverse < T > {
353
354
#[ inline]
354
355
fn cmp ( & self , other : & Reverse < T > ) -> Ordering {
0 commit comments