Uh oh!
There was an error while loading. Please reload this page.
Reorder span suggestions to appear below main labels - #43251
Conversation
oli-obk
left a comment
There was a problem hiding this comment.
Just a nit. Lgtm otherwise
There was a problem hiding this comment.
Please add a comment here about what and why this is done, the reversing is pretty subtle.
There was a problem hiding this comment.
I agree that a comment would be good. I personally have no idea why this yields the correct result. =) But the change looks good!
There was a problem hiding this comment.
If you have a list of annotations (A1, A2, C1, C2, B1, B2) where the letter signifies the span, since we are only sorting by the span, the order of the elements with the same span will never change. Since we are reversing the ordering (|a, b| but b.cmp(a)), you get (C1, C2, B1, B2, A1, A2). All the elements with the same span are still ordered first to last, but all the elements with different spans are ordered by their spans in last to first order. Last to first order is important, because the jiggly lines and | are on the left, so the rightmost span needs to be rendered first, otherwise the lines would end up needing to go over a message.
If the above is comprehensible, I think it can be copy pasted as the requested comment ;)
There was a problem hiding this comment.
since we are only sorting by the span, the order of the elements with the same span will never change
This is because our sort is stable?
There was a problem hiding this comment.
@nikomatsakis the documentation says that sort_by is stable though. @oli-obk@evolarium
There was a problem hiding this comment.
This seems like a pretty decent description. =)
oli-obk
commented
Jul 16, 2017
hmm, bors does't like review comments. I'm not a reviewer, so: |
nikomatsakis
left a comment
There was a problem hiding this comment.
A comment explaining why the sort produces the desired effect would be good! But otherwise looks nice.
bors
commented
Jul 17, 2017
☔ The latest upstream changes (presumably #42033) made this pull request unmergeable. Please resolve the merge conflicts. |
e38877f to
66f3c07Comparenikomatsakis
commented
Jul 17, 2017
@bors r+ |
bors
commented
Jul 17, 2017
📌 Commit 66f3c07 has been approved by |
oli-obk
commented
Jul 17, 2017
You have some trailing whitespace in |
gaurikholkar-zz
commented
Jul 17, 2017
@oli-obk fixed the tidy errors. |
nikomatsakis
commented
Jul 17, 2017
@bors r+ |
bors
commented
Jul 17, 2017
📌 Commit 601a7a9 has been approved by |
Mark-Simulacrum
commented
Jul 17, 2017
Could you squash the commits down? |
db9b62b to
26a8357Comparenikomatsakis
commented
Jul 17, 2017
@bors r+ |
bors
commented
Jul 17, 2017
📌 Commit 26a8357 has been approved by |
bors
commented
Jul 18, 2017
⌛ Testing commit 26a8357 with merge 67cdb87d51c55b3a1b2e70f37992f70f8fcda9e9... |
bors
commented
Jul 18, 2017
💔 Test failed - status-travis |
est31
commented
Jul 18, 2017
@bors retry |
bors
commented
Jul 19, 2017
⌛ Testing commit 26a8357 with merge f868a5ba86c3e204cfde67a7ec9405bd6433bbee... |
bors
commented
Jul 19, 2017
💔 Test failed - status-appveyor |
oli-obk
commented
Jul 19, 2017
spurious? |
gaurikholkar-zz
commented
Jul 19, 2017
Network connectivity issues? |
est31
commented
Jul 19, 2017
nagbot-rs
commented
Jul 19, 2017
via email
@bors: retry …On Wed, Jul 19, 2017 at 4:02 AM, bors ***@***.***> wrote:
💔 Test failed - status-appveyor
<https://ci.appveyor.com/project/rust-lang/rust/build/1.0.3972>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#43251 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AaPN0C1dUzhMugaxuquAokDAsrfW3imXks5sPcYkgaJpZM4OZAep>
.
--
You received this message because you are subscribed to the Google Groups
"rust-ops" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to ***@***.***
To post to this group, send email to ***@***.***
To view this discussion on the web visit https://groups.google.com/d/
msgid/rust-ops/rust-lang/rust/pull/43251/c316320506%40github.com
<https://groups.google.com/d/msgid/rust-ops/rust-lang/rust/pull/43251/c316320506%40github.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
|
bors
commented
Jul 19, 2017
@nagbot-rs: 🔑 Insufficient privileges: and not in try users |
alexcrichton
commented
Jul 19, 2017
@bors: retry |
bors
commented
Jul 20, 2017
Reorder span suggestions to appear below main labels A fix to #41698 r? @nikomatsakis
bors
commented
Jul 20, 2017
☀️ Test successful - status-appveyor, status-travis |
A fix to #41698
r? @nikomatsakis