-
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
proc macro attributes considered to be unresolvedReference
#10935
Comments
Actually now I wonder if it would make sense to push proc macro authors to expose dummy attributes that resolve to these helpers. That way people could also hover them for more info on the helper itself 🤔 |
Opened a zulip thread for the latter idea. Highlighting issue papered over again with #10937 for now. |
bors
added a commit
that referenced
this issue
Jul 26, 2022
feat: Resolve derive helper attributes in IDE layer ![image](https://user-images.githubusercontent.com/3757771/180647125-98cae13b-a7b4-446b-8a64-fae014f982e2.png) Also downmaps tokens inside deriver helpers to the derive expansion ![image](https://user-images.githubusercontent.com/3757771/180642110-699bdc73-e1f3-4692-94f2-21544f824ab9.png) This does not handle the case where multiple derives make use of the same helper name though, unsure how to tackle that yet. Partially addresses #10935
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
consider the following code used w/ the serde library:
We should be able to figure out if this is a valid attribute or not, by looking at the things the structs derive from and looking at the attributes for each proc macro to compute a list of identifiers that are valid within this context:
Bonus points would be to have a hover implementation that shows which proc macro's are consuming this attribute as well!
rust-analyzer version: 6434ada 2021-12-05 dev
rustc-version: 1.57.0
The text was updated successfully, but these errors were encountered: