diff --git a/src/libcore/cmp.rs b/src/libcore/cmp.rs index 266cae3c122..e6759d1bad9 100644 --- a/src/libcore/cmp.rs +++ b/src/libcore/cmp.rs @@ -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(#[stable(feature = "reverse_cmp_key", since = "1.19.0")] pub T);