Convert sort_unstable_by to sort_by_cached_key
This commit is contained in:
parent
d3fe534fcf
commit
5cd0504d10
@ -1435,9 +1435,7 @@ impl<'a, 'tcx, 'rcx> AutoTraitFinder<'a, 'tcx, 'rcx> {
|
||||
// involved (impls rarely have more than a few bounds) means that it
|
||||
// shouldn't matter in practice.
|
||||
fn unstable_debug_sort<T: Debug>(&self, vec: &mut Vec<T>) {
|
||||
vec.sort_unstable_by(|first, second| {
|
||||
format!("{:?}", first).cmp(&format!("{:?}", second))
|
||||
});
|
||||
vec.sort_by_cached_key(|x| format!("{:?}", x))
|
||||
}
|
||||
|
||||
fn is_fn_ty(&self, tcx: &TyCtxt, ty: &Type) -> bool {
|
||||
|
@ -20,6 +20,7 @@
|
||||
#![feature(box_syntax)]
|
||||
#![feature(fs_read_write)]
|
||||
#![feature(set_stdio)]
|
||||
#![feature(slice_sort_by_cached_key)]
|
||||
#![feature(test)]
|
||||
#![feature(unicode)]
|
||||
#![feature(vec_remove_item)]
|
||||
|
Loading…
x
Reference in New Issue
Block a user