-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Proc-macros that re-use input spans break our syntax fixup #13388
Comments
So we have a problem here, the span setting happens entirely in the proc-macro library so we can't special case any of the |
In other words, identity as a concept for spans/tokens cannot exist in Rust. So our fixup infra has a problem. |
This works better now due to changes in tokio, but the general issue is still a thing. |
Any shot this will be fixed? I'd be happy to contribute and resolve the issue, but I have no idea where to start lol |
This is not workable from our side unfortunately, this is an inherent issue with the way proc-macros work. So the only other venue is changing the span usage in the tokio macros |
@Veykril I think I actually got an idea that may improve things quite a bit. Let me see how this will work... |
Curious to hear about that as I don't see see how we could figure out if a span was re-used or not. |
Actually I get completions as normal for |
Interesting. Seems to be an issue specific to I see Cursor uses an ancient version of |
gets expanded to
while ideally it should be
tokio-macros version 1.8.0
This happens because the tokio macro is applying the span of the final expression of the block to all its extra tokens that it is outputting, so our syntax fixup (given its based on the token id of tokens, and token ids being our current span) completely obliterates the output in this case.
The text was updated successfully, but these errors were encountered: