Uh oh!
There was an error while loading. Please reload this page.
Defunctionalize spans for diagnostics - #72142
Conversation
rust-highfive
commented
May 12, 2020
The job Click to expand the log.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 |
bors
commented
May 13, 2020
☔ The latest upstream changes (presumably #71451) made this pull request unmergeable. Please resolve the merge conflicts. |
estebank
commented
May 14, 2020
re:diagnostics: there seems to be an off by one error somewhere in the emitter code but don't have time to dig into it now. I'm ok with the mild regression as long as we cut a ticket when landing this. Also, I don't think you should be updating |
tesuji
commented
May 14, 2020
Clippy will block build without updating. |
cjgillot
commented
May 14, 2020
@estebank I cc'd you to get your opinion on the opportunity, and on the hassle for diagnostic writers. Sorry if I was not clear. |
bors
commented
May 14, 2020
☔ The latest upstream changes (presumably #72202) made this pull request unmergeable. Please resolve the merge conflicts. |
Muirrum
commented
Jul 24, 2020
@cjgillot This is a triage team bump. |
Muirrum
commented
Aug 13, 2020
@cjgillot What's the status on this PR? |
Dylan-DPC-zz
commented
Aug 14, 2020
closing this due to inactivity & long list of conflicts |
This is another experiment for #47389.
The idea is to avoid manipulating concrete spans when constructing diagnostics,
and replace those by abstract spans. The diagnostic emission (and re-emission in incr. compilation) are responsible for reifying the spans.
The goal is to remove dependency from diagnostics to spans.
This PR introduces a new
SpanIdtype, which is used for diagnostics.For now, it has 2 variants:
Span;DefId, and represents itsdef_span.A
GuessHeadSpanvariant may be useful.Most of the changes are the mechanical substitution
def_span -> real_def_span.The next step is to have the
SpanIdto bubble up and down,and reduce the amount of back-and-forth.
Open questions:
SpanId?Once I have more visibility on those questions, I will file a MCP.
r? @pnkfelix
cc @estebank for diagnostics