-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Defunctionalize spans for diagnostics #72142
Conversation
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 |
☔ The latest upstream changes (presumably #71451) made this pull request unmergeable. Please resolve the merge conflicts. |
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 |
Clippy will block build without updating. |
@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. |
☔ The latest upstream changes (presumably #72202) made this pull request unmergeable. Please resolve the merge conflicts. |
@cjgillot This is a triage team bump. |
@cjgillot What's the status on this PR? |
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
SpanId
type, which is used for diagnostics.For now, it has 2 variants:
Span
;DefId
, and represents itsdef_span
.A
GuessHeadSpan
variant may be useful.Most of the changes are the mechanical substitution
def_span -> real_def_span
.The next step is to have the
SpanId
to 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