Account for tabs when highlighting multiline code suggestions#87976
Account for tabs when highlighting multiline code suggestions#87976bors merged 5 commits intorust-lang:masterfrom
Conversation
|
r? @cjgillot (rust-highfive has picked a reviewer for you, use r? to override) |
compiler/rustc_errors/src/emitter.rs
Outdated
There was a problem hiding this comment.
In particular, I want to confirm that the output of the terminal without emoji support you showed here is reasonable (as I fully expect it to be, because it relies on what we were doing for the multiline case, which looks ok in that screenshot).
There was a problem hiding this comment.
Sadly, now I'm seeing other issues :(
655a555 to
1a519ff
Compare
This comment has been minimized.
This comment has been minimized.
d8fc003 to
e86547e
Compare
|
Can you take care of this PR @m-ou-se? |
e86547e to
1cfe7c0
Compare
|
@m-ou-se do let me know if there's anything left here. I want to avoid this not reaching master before the next beta cutoff. |
m-ou-se
left a comment
There was a problem hiding this comment.
I found one more (unlikely) edge case (which is not very important, but not hard to fix), and a have a small comment on the code.
r=me either way
compiler/rustc_errors/src/emitter.rs
Outdated
There was a problem hiding this comment.
Ah, yes. I assumed that we didn't have tabs in the suggestion because I didn't account for cases where snippets from the user include them :-/
There was a problem hiding this comment.
I suppose all cases where user snippets are included should be replaced by multispan suggestions. (This specific one is already fixed by #87958, but I think there's quite a few places left where this happens.)
There was a problem hiding this comment.
Could you give me the repro case? I think I fixed this, but the suggestions seem to be doing the right thing for me.
There was a problem hiding this comment.
With #87958 merged, the test case in the screenshot above doesn't trigger the problem anymore. We'll have to find another case where a bunch of user code gets put verbatim in the suggestion. Grepping for span_to_snippet now. ^^
5398b6b to
8f746d2
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
8f746d2 to
955e913
Compare
This comment has been minimized.
This comment has been minimized.
|
@bors r=m-ou-se |
|
📌 Commit 955e913 has been approved by |
Rollup of 6 pull requests Successful merges: - rust-lang#87976 (Account for tabs when highlighting multiline code suggestions) - rust-lang#88174 (Clarify some wording in Rust 2021 lint docs) - rust-lang#88188 (Greatly improve limitation handling on parallel rustdoc GUI test run) - rust-lang#88230 (Fix typos “a”→“an”) - rust-lang#88232 (Add notes to macro-not-found diagnostics to point out how things with the same name were not a match.) - rust-lang#88259 (Do not mark `-Z thir-unsafeck` as unsound anymore) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
|
I'm getting this when I run |
|
@camsteffen it sounds like there might be a malformed |
|
Yes I am seeing that error on multiple Clippy UI tests just running that command on 4878034 (and probably current master). |
|
I wasn't able to reproduce this :-/ |
|
Well shoot. Must've been an artifact of my local setup. I'm not seeing it either and it hasn't shown up in CI. |








Address
'\t'case in #87972.Before:
After: