-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Small rustc_resolve
cleanups
#135677
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
Small rustc_resolve
cleanups
#135677
Conversation
None | ||
extern_crate_names.sort_by_key(|&name| Reverse(name)); | ||
|
||
extern_crate_names |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like this is harder to read than the existing code. Can you revert it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, you're right, also doesn't fit the commit it was in. Reverted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using Reverse
here was actually wrong because I was ordering by Symbol
(which orders by index) instead of its string repr. Unfortunately I had to revert to sort_by
because of lifetime issues, but at least I could still use total ordering instead of partial.
eb10a58
to
a909520
Compare
@bors r+ |
…piler-errors Small `rustc_resolve` cleanups 1. Don't open-code `Reverse` 2. Use slice patterns where possible
a909520
to
d913c37
Compare
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#135616 (CI: split i686-msvc job to two free runners) - rust-lang#135623 (ci: use ghcr ubuntu image for mingw-check-tidy) - rust-lang#135640 (Drop MIPS glibc 2.23 patches that reside in crosstool-ng now) - rust-lang#135663 (Fix ICE in resolving associated items as non-bindings) - rust-lang#135677 (Small `rustc_resolve` cleanups) - rust-lang#135680 (coverage: Clean up a few things after the counters overhaul) - rust-lang#135697 (Get rid of `ToPolyTraitRef`) r? `@ghost` `@rustbot` modify labels: rollup
☔ The latest upstream changes (presumably #135769) made this pull request unmergeable. Please resolve the merge conflicts. |
505585f
to
9cd875b
Compare
9cd875b
to
ce0b72a
Compare
@bors r=compiler-errors |
…piler-errors Small `rustc_resolve` cleanups 1. Don't open-code `Reverse` 2. Use slice patterns where possible
Rollup of 6 pull requests Successful merges: - rust-lang#134999 (Add cygwin target.) - rust-lang#135677 (Small `rustc_resolve` cleanups) - rust-lang#136699 (std: replace the `FromInner` implementation for addresses with private conversion functions) - rust-lang#136758 (tests: `-Copt-level=3` instead of `-O` in assembly tests) - rust-lang#136761 (tests: `-Copt-level=3` instead of `-O` in codegen tests) - rust-lang#136833 (compiler: die immediately instead of handling unknown target codegen) Failed merges: - rust-lang#136808 (Try to recover from path sep error in type parsing) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#135285 (it-self → itself, build-system → build system, type-alias → type alias) - rust-lang#135677 (Small `rustc_resolve` cleanups) - rust-lang#136239 (show supported register classes in error message) - rust-lang#136246 (include note on variance and example) - rust-lang#136354 (Update docs for impl keyword) - rust-lang#136786 (Remove the deduplicate_blocks pass) - rust-lang#136833 (compiler: die immediately instead of handling unknown target codegen) - rust-lang#136847 (Simplify intra-crate qualifiers.) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#135285 (it-self → itself, build-system → build system, type-alias → type alias) - rust-lang#135677 (Small `rustc_resolve` cleanups) - rust-lang#136239 (show supported register classes in error message) - rust-lang#136246 (include note on variance and example) - rust-lang#136354 (Update docs for impl keyword) - rust-lang#136786 (Remove the deduplicate_blocks pass) - rust-lang#136833 (compiler: die immediately instead of handling unknown target codegen) - rust-lang#136847 (Simplify intra-crate qualifiers.) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#135677 - yotamofek:resolve-cleanups2, r=compiler-errors Small `rustc_resolve` cleanups 1. Don't open-code `Reverse` 2. Use slice patterns where possible
Reverse