Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use sort_by_cached_key where appropriate #49525

Merged
merged 7 commits into from
Apr 12, 2018

Conversation

varkor
Copy link
Member

@varkor varkor commented Mar 30, 2018

A follow-up to #48639, converting various slice sorting calls to sort_by_cached_key when the key functions are more expensive.

@TimNN
Copy link
Contributor

TimNN commented Mar 30, 2018

Your PR failed on Travis. Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
Resolving deltas: 100% (613367/613367), completed with 4863 local objects.
---
[00:00:44] configure: rust.quiet-tests     := True
---
[00:29:35] error[E0658]: use of unstable library feature 'slice_sort_by_cached_key' (see issue #34447)
[00:29:35]    --> librustc_trans/base.rs:828:23
[00:29:35]     |
[00:29:35] 828 |         codegen_units.sort_by_cached_key(|cgu| usize::MAX - cgu.size_estimate());
[00:29:35]     |                       ^^^^^^^^^^^^^^^^^^
[00:29:35]     |
[00:29:35]     = help: add #![feature(slice_sort_by_cached_key)] to the crate attributes to enable
---
[00:29:38]   process didn't exit successfully: `/checkout/obj/build/bootstrap/debug/rustc --crate-name rustc_trans librustc_trans/lib.rs --color always --error-format json --crate-type dylib --emit=dep-info,link -C prefer-dynamic -C opt-level=2 --cfg feature="jemalloc" --cfg feature="rustc_back" -C metadata=0a35af2040a3821a -C extra-filename=-0a35af2040a3821a --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/release/deps --extern tempdir=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libtempdir-c94e1f8066e974d5.rlib --extern serialize=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libserialize-2dfeda5511768b32.so --extern serialize=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libserialize-2dfeda5511768b32.rlib --extern rustc_back=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_back-4dabcc09012ea6c1.so --extern rustc_demangle=/checkout/obj/build/x86_64-unknown-linux-gnuheckout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/build/miniz-sys-10ea99b4ea787d00/out -L native=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/build/backtrace-sys-98efbe9a93844c35/out/.libs -L native=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/build/rustc_llvm-9b5d9b4973b211b0/out -L native=/usr/lib/llvm-3.9/lib` (exit code: 101)
[00:29:38] travis_fold:start:stage1-rustc_trans
travis_time:start:stage1-rustc_trans
command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "--release" "--locked" "--color" "always" "--manifest-path" "/checkout/src/librustc_trans/Cargo.toml" "--features" " jemalloc" "--message-format" "json"
[00:29:38] expected success, got: exit code: 101
[00:29:38] thread 'main' panicked at 'cargo must succeed', bootstrap/compile.rs:1064:9
[00:29:38] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[00:29:38] travis_fold:end:stage1-rustc_trans
[00:29:38] travis_time:end:stage1-rustc_trans:start=1522443852479970552,finish=1522443867435014761,duration=14955044209
[00:29:38] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap build
[00:29:38] Build completed unsuccessfully in 0:25:19
[00:29:38] Makefile:28: recipe for target 'all' failed
[00:29:38] make: *** [all] Error 1
---
$ cat obj/tmp/sccache.log
travis_time:end:2073ad46:start=1522 1.

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN.

@varkor varkor force-pushed the sort_by_cached_key-conversion branch from a89ce71 to 51a10da Compare March 30, 2018 21:14
Copy link
Member

@scottmcm scottmcm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice to see wins from this!

@@ -3577,7 +3576,7 @@ impl<'a> Resolver<'a> {

let name = path[path.len() - 1].node.name;
// Make sure error reporting is deterministic.
names.sort_by_key(|name| name.as_str());
names.sort_by_cached_key(|name| name.as_str());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.as_str() is typically -> &str and thus cheap, so maybe double-check this one.

Copy link
Member Author

@varkor varkor Mar 31, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method is coming from:

pub fn as_str(self) -> InternedString {
with_interner(|interner| unsafe {
InternedString {
string: ::std::mem::transmute::<&str, &str>(interner.get(self))
}
})
}

which seemed non-trivial (but perhaps it can be optimised quite effectively?).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, it's probably fairly cheap, but might be worth caching it anyway so the sort code is easier for the compiler to deal with. Thanks for resolving the type :)

@@ -825,7 +825,7 @@ pub fn trans_crate<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
// a bit more efficiently.
let codegen_units = {
let mut codegen_units = codegen_units;
codegen_units.sort_by_key(|cgu| usize::MAX - cgu.size_estimate());
codegen_units.sort_by_cached_key(|cgu| usize::MAX - cgu.size_estimate());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sure looks like it wants |cgu| cmp::Reverse(cgu::size_estimate()), though I don't know if that's this PR

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, that's a good point; I may as well fix that one here in passing.

@@ -799,7 +799,7 @@ impl<'a, 'gcx, 'tcx> ProbeContext<'a, 'gcx, 'tcx> {
.collect();

// sort them by the name so we have a stable result
names.sort_by_key(|n| n.as_str());
names.sort_by_cached_key(|n| n.as_str());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as_str comment

@@ -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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also probably not this PR, but this comment makes me wonder if it would be worth adding if len < 2 { return } to the checks excerpted below, since sort_by_cached_key is currently a pessimization in the len==1 case, as it'll compute the key and allocate, which ordinary sort_by_key wouldn't.

rust/src/liballoc/slice.rs

Lines 1402 to 1406 in 1c5283b

let len = self.len();
if sz_u8 < sz_u16 && len <= ( u8::MAX as usize) { return sort_by_key!( u8, self, f) }
if sz_u16 < sz_u32 && len <= (u16::MAX as usize) { return sort_by_key!(u16, self, f) }
if sz_u32 < sz_usize && len <= (u32::MAX as usize) { return sort_by_key!(u32, self, f) }
sort_by_key!(usize, self, f)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's another good point: I'll add that extra check in! (len == 2 could also be special cased to not allocate, as only one comparison will be executed, but that's a less likely case to encounter.)

@TimNN
Copy link
Contributor

TimNN commented Mar 31, 2018

Your PR failed on Travis. Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
Resolving deltas: 100% (613419/613419), completed with 4860 local objects.
---
[00:00:47] configure: rust.quiet-tests     := True
---
[00:12:47] error[E0433]: failed to resolve. Use of undeclared type or module `cmp`
[00:12:47]    --> librustc_mir/monomorphize/partitioning.rs:454:48
[00:12:47]     |
[00:12:47] 454 |         codegen_units.sort_by_cached_key(|cgu| cmp::Reverse(cgu.size_estimate()));
[00:12:47]     |                                                ^^^ Use of undeclared type or module `cmp`
---
[00:12:58]   process didn't exit successfully: `/checkout/obj/build/bootstrap/debug/rustc --crate-name rustc_mir librustc_mir/lib.rs --color always --error-format json --crate-type dylib --emit=dep-info,link -C prefer-dynamic -C opt-level=2 -C metadata=02ca437d4346e274 -C extra-filename=-02ca437d4346e274 --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/release/deps --extern graphviz=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libgraphviz-01fc77d929e8bdd6.so --extern arena=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libarena-2e4ce590106ede04.so --extern bitflags=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libbitflags-e01ce88b04783514.rlib --extern rustc_const_math=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_const_math-9784fba5d291c443.so --extern log_settings=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/liblog_settings-6f97f4efb9094c9d.rlib --extern rustc=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc-50848c58fc469522.so --extern byteorder=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libbyteorder-01f70e5b8d09b4d5.rlib --extern serialize=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libserialize-f27fded04dd31022.so --extern serialize=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libserialize-f27fded04dd31022.rlib --extern rustc_errors=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_errors-e8abef14b8b443aa.so --extern rustc_apfloat=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_apfloat-b23276248c684a7d.rlib --extern rustc_back=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_back-078085824a3af3a6.so --extern rustc_data_structures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_data_structures-7eb604ad0d7f2749.so --extern syntax_pos=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libsyntax_pos-505a23f516928b0b.so --extern syntax=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libsyntax-7437cee1018df6d3.so --extern log=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/liblog-7eebd272275b441b.rlib -L native=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/build/backtrace-sys-751752dec0960570/out/.libs -L native=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/build/miniz-sys-07c608814ba8d6ba/out` (exit code: 101)
---
$ ls -lat $HOME/Library/Logs/DiagnosticReports/
ls: cannot access /home/travis/Library/Logs/DiagnosticReports/: No such file or directory
travis_time:end:19592689:start=1522529946289125265,finish=1522529946295321976,duration=6196711
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:101348d8
$ find $HOME/Library/Logs/DiagnosticReports -type f -name '*.crash' -not -name '*.stage2-*.crash' -not -name 'com.apple.CoreSimulator.CoreSimulatorService-*.crash' -exec printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" {} \; -exec head -750 {} \; -exec echo travis_fold":"end:crashlog \; || true
find: `/home/travis/Library/Logs/DiagnosticReports': No such file or directory
travis_time:end:101348d8:start=1522529946300875818,finish=1522529946306722289,duration=5846471
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:0fc2d77c
$ dmesg | grep -i kill
[   10.785076] init: failsafe main process (1092) killed by TERM signal

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN.

@varkor varkor force-pushed the sort_by_cached_key-conversion branch 2 times, most recently from 24c8f8f to af6027c Compare March 31, 2018 21:22
@TimNN
Copy link
Contributor

TimNN commented Mar 31, 2018

Your PR failed on Travis. Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
Resolving deltas: 100% (613419/613419), completed with 4860 local objects.
---
[00:00:57] configure: rust.quiet-tests     := True
---
[00:12:13] error[E0433]: failed to resolve. Use of undeclared type or module `std`
[00:12:13]    --> librustc_mir/monomorphize/partitioning.rs:453:48
[00:12:13]     |
[00:12:13] 453 |         codegen_units.sort_by_cached_key(|cgu| std::cmp::Reverse(cgu.size_estimate()));
[00:12:13]     |                                                ^^^ Use of undeclared type or module `std`
---
[00:12:24]   process didn't exit successfully: `/checkout/obj/build/bootstrap/debug/rustc --crate-name rustc_mir librustc_mir/lib.rs --color always --error-format json --crate-type dylib --emit=dep-info,link -C prefer-dynamic -C opt-level=2 -C metadata=02ca437d4346e274 -C extra-filename=-02ca437d4346e274 --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/release/deps --extern syntax_pos=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libsyntax_pos-505a23f516928b0b.so --extern rustc_errors=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_errors-e8abef14b8b443aa.so --extern log=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/liblog-7eebd272275b441b.rlib --extern log_settings=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/liblog_settings-6f97f4efb9094c9d.rlib --extern rustc_data_structures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_data_structures-7eb604ad0d7f2749.so --extern serialize=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libserialize-f27fded04dd31022.so --extern serialize=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libserialize-f27fded04dd31022.rlib --extern rustc_back=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_back-078085824a3af3a6.so --extern rustc_const_math=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_const_math-9784fba5d291c443.so --extern byteorder=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libbyteorder-01f70e5b8d09b4d5.rlib --extern rustc=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc-50848c58fc469522.so --extern rustc_apfloat=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_apfloat-b23276248c684a7d.rlib --extern arena=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libarena-2e4ce590106ede04.so --extern bitflags=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libbitflags-e01ce88b04783514.rlib --extern syntax=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libsyntax-7437cee1018df6d3.so --extern graphviz=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libgraphviz-01fc77d929e8bdd6.so -L native=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/build/backtrace-sys-751752dec0960570/out/.libs -L native=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/build/miniz-sys-07c608814ba8d6ba/out` (exit code: 101)
[00:12:24] warning: build failed, waiting for other jobs to finish...
[00:13:56] error: build failed
[00:13:56] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "--release" "--locked" "--color" "always" "--features" " jemalloc" "--manifest-path" "/checkout/src/rustc/Cargo.toml" "--message-format" "json"
[00:13:56] expected success, got: exit code: 101
[00:13:56] thread 'main' panicked at 'cargo must succeed', bootstrap/compile.rs:1064:9
[00:13:56] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[00:13:56] travis_fold:end:stage0-rustc
[00:13:56] travis_time:end:stage0-rustc:start=1522531312438553593,finish=1522531862907214082,duration=550468660489
[00:13:56] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap build
[00:13:56] Build completed unsuccessfully in 0:09:23
[00:13:56] make: *** [all] Error 1
[00:13:56] Makefile:28: recipe for target 'all' failed
---
$ cat obj/tmp/sccache.log
---
$ ls -lat $HOME/Library/Logs/DiagnosticReports/
ls: cannot access /home/travis/Library/Logs/DiagnosticReports/: No such file or directory
travis_time:end:120c88f0:start=1522531863441729109,finish=1522531863447461641,duration=5732532
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:280d4a34
$ find $HOME/Library/Logs/DiagnosticReports -type f -name '*.crash' -not -name '*.stage2-*.crash' -not -name 'com.apple.CoreSimulator.CoreSimulatorService-*.crash' -exec printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" {} \; -exec head -750 {} \; -exec echo travis_fold":"end:crashlog \; || true
find: `/home/travis/Library/Logs/DiagnosticReports': No such file or directory
travis_time:end:280d4a34:start=1522531863452695620,finish=1522531863458333331,duration=5637711
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:031ff788
$ dmesg | grep -i kill
[   10.710712] init: failsafe main process (1094) killed by TERM signal

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN.

@sinkuu
Copy link
Contributor

sinkuu commented Apr 1, 2018

Can you also use sort_by_cached_key here?

let items: Vec<_> = self.items().iter().map(|(&i, &l)| (i, l)).collect();
let mut items : Vec<_> = items.iter()
.map(|il| (il, item_sort_key(tcx, il.0))).collect();
items.sort_by(|&(_, ref key1), &(_, ref key2)| key1.cmp(key2));
items.into_iter().map(|(&item_linkage, _)| item_linkage).collect()

This could just be

        let mut items: Vec<_> = self.items().iter().map(|(&i, &l)| (i, l)).collect();
        items.sort_by_cached_key(|&(i, _)| item_sort_key(tcx, i));
        items

@varkor
Copy link
Member Author

varkor commented Apr 1, 2018

@sinkuu: Good catch, thanks!

@pietroalbini pietroalbini added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 2, 2018
@bors
Copy link
Contributor

bors commented Apr 7, 2018

☔ The latest upstream changes (presumably #49661) made this pull request unmergeable. Please resolve the merge conflicts.

@varkor varkor force-pushed the sort_by_cached_key-conversion branch from df5520c to e7aa139 Compare April 9, 2018 15:54
}
});
// The sort doesn't case-fold but it's doubtful we care.
lints.sort_by_cached_key(|x: &&Lint| (x.default_level(sess), x.name));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh cute!

@pnkfelix
Copy link
Member

@bors r=scottmcm

@bors
Copy link
Contributor

bors commented Apr 11, 2018

📌 Commit e7aa139 has been approved by scottmcm

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 11, 2018
kennytm added a commit to kennytm/rust that referenced this pull request Apr 11, 2018
…n, r=scottmcm

Use sort_by_cached_key where appropriate

A follow-up to rust-lang#48639, converting various slice sorting calls to `sort_by_cached_key` when the key functions are more expensive.
bors added a commit that referenced this pull request Apr 11, 2018
Rollup of 14 pull requests

Successful merges:

 - #49525 (Use sort_by_cached_key where appropriate)
 - #49575 (Stabilize `Option::filter`.)
 - #49614 (in which the non-shorthand patterns lint keeps its own counsel in macros)
 - #49665 (Small nits to make couple of tests pass on mips targets.)
 - #49781 (add regression test for #16223 (NLL): use of collaterally moved value)
 - #49795 (Properly look for uninhabitedness of variants in niche-filling check)
 - #49809 (Stop emitting color codes on TERM=dumb)
 - #49856 (Do not uppercase-lint #[no_mangle] statics)
 - #49863 (fixed typo)
 - #49857 (Fix "fp" target feature for AArch64)
 - #49849 (Add --enable-debug flag to musl CI build script)
 - #49734 (proc_macro: Generalize `FromIterator` impl)
 - #49730 (Fix ICE with impl Trait)
 - #48270 (Replace `structurally_resolved_type` in casts check.)

Failed merges:
@bors bors merged commit e7aa139 into rust-lang:master Apr 12, 2018
@varkor varkor deleted the sort_by_cached_key-conversion branch April 12, 2018 00:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants