Skip to content

Completion does not work in attribute macros #9866

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

Closed
Tracked by #9868
jonas-schievink opened this issue Aug 12, 2021 · 0 comments · Fixed by #10126
Closed
Tracked by #9868

Completion does not work in attribute macros #9866

jonas-schievink opened this issue Aug 12, 2021 · 0 comments · Fixed by #10126
Assignees
Labels
A-completion autocompletion A-macro macro expansion S-actionable Someone could pick this issue up and work on it right now

Comments

@jonas-schievink
Copy link
Contributor

During completion, we use this code to descend from a macro invocation to the expansion:

https://github.com/rust-analyzer/rust-analyzer/blob/1376ece497c2e189c97810e188e25c94f10951a8/crates/ide_completion/src/context.rs#L178-L182

This does not handle attribute macros, so completion doesn't work inside them. The code also makes use of speculative expansion, which is not yet implemented for attribute macros.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-completion autocompletion A-macro macro expansion S-actionable Someone could pick this issue up and work on it right now
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants