-
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
#![allow(clippy::
incorrectly completes with a leading clippy::
#7144
Comments
I noticed that what the user typed so far is highlighted in the completion hints EDIT: Actually, the highlighting behavior is the same for other kinds of completions after double colon. What's different is that the completion hints don't include the part before the :: I did some debug printing inside |
Something similar happens with |
Looks like the attribute is being parsed as
Shouldn't that bet a |
Macro invocations are raw token trees, so no tokens are joined because there is no "semantic meaning" |
Welp, I give up for now, haha. I have no idea how to debug this. |
I think this is just an issue with vsc not thinking the colons form a full ident and therefore putting the completion just after the colons, while RA should be telling it to replace everything in the completion |
The problem here is that we do not recognize the Basically the |
Fixing this is rather tricky as we have to basically manually reparse the input we are expecting. It would be great if we could reuse that path completion infra here but inputs to attributes are just random tokens to us. |
Reproducible code
Select any of the lints, it will be completed as
#![allow(clippy::clippy::or_fun_call)]
for example, which is incorrect.I presume this is because vsc does not consider
clippy::
to be a full ident per the rust grammar, therefore it thinks the completion should go after it because the first part isnt part of itThe text was updated successfully, but these errors were encountered: