Rollup merge of #47379 - da-x:master, r=sfackler
Derive std::cmp::Reverse as Copy or Clone If the type parameter is Copy or Clone, then `Reverse` should be too.
This commit is contained in:
commit
2a32060fb6
@ -343,7 +343,7 @@ impl Ordering {
|
||||
/// v.sort_by_key(|&num| (num > 3, Reverse(num)));
|
||||
/// assert_eq!(v, vec![3, 2, 1, 6, 5, 4]);
|
||||
/// ```
|
||||
#[derive(PartialEq, Eq, Debug)]
|
||||
#[derive(PartialEq, Eq, Debug, Copy, Clone)]
|
||||
#[stable(feature = "reverse_cmp_key", since = "1.19.0")]
|
||||
pub struct Reverse<T>(#[stable(feature = "reverse_cmp_key", since = "1.19.0")] pub T);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user