-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
feat: Fix up syntax errors in attribute macro inputs to make completion work more often #11444
feat: Fix up syntax errors in attribute macro inputs to make completion work more often #11444
Conversation
Ye I agree, this interaction seems rather difficult to get behind. I hope there is some cleanup we can do here. |
@Veykril any objections to merging it in the current state though? |
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.
No objections here,
one thing to note as the fixup stuff is only really relevant for completions, I am not too fond of the fixup stuff being generated for all other macro expansion query calls that aren't interested in it(though this probably is a non-issue)
Forget this comment we do need it for everything probably(due to diagnostics etc)
We do need the fixup for the expansion during normal analysis even for completions anyway, since we (currently) can't do things like name resolution inside the speculative expansion. bors r+ |
This implements the "fix up syntax nodes" workaround mentioned in #11014. It isn't much more than a proof of concept; I have only implemented a few cases, but it already helps quite a bit.
Some notes: