未验证 提交 6fa14f0e 编写于 作者: M Manish Goregaokar

Rollup merge of #48628 - strake:reverse, r=sfackler

Fixes #47311.
r? @nrc
......@@ -343,7 +343,7 @@ pub fn then_with<F: FnOnce() -> Ordering>(self, f: F) -> Ordering {
/// v.sort_by_key(|&num| (num > 3, Reverse(num)));
/// assert_eq!(v, vec![3, 2, 1, 6, 5, 4]);
/// ```
#[derive(PartialEq, Eq, Debug, Copy, Clone)]
#[derive(PartialEq, Eq, Debug, Copy, Clone, Default, Hash)]
#[stable(feature = "reverse_cmp_key", since = "1.19.0")]
pub struct Reverse<T>(#[stable(feature = "reverse_cmp_key", since = "1.19.0")] pub T);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册