Skip to content
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

Expand attribute-like proc macros #8971

Closed
matklad opened this issue May 24, 2021 · 0 comments · Fixed by #9128
Closed

Expand attribute-like proc macros #8971

matklad opened this issue May 24, 2021 · 0 comments · Fixed by #9128
Assignees
Labels
E-hard fun A technically challenging issue with high impact

Comments

@matklad
Copy link
Member

matklad commented May 24, 2021

No description provided.

@matklad matklad added E-hard fun A technically challenging issue with high impact labels May 24, 2021
@matklad matklad assigned matklad and jonas-schievink and unassigned matklad May 24, 2021
bors bot added a commit that referenced this issue Jun 3, 2021
9128: feat: expand procedural attribute macros r=jonas-schievink a=jonas-schievink

This adds experimental support for attribute macros. They can be enabled by setting `rust-analyzer.experimental.procAttrMacros` to `true`.

Known issues:
* Tokens aren't remapped, presumably because we edit the input syntax tree (this causes IDE features to not work inside items with attribute macros on them)
* Macro errors aren't reported correctly

Closes #8971
Fixes #8964 / la10736/rstest#120
Fixes #2984
Fixes #5412
Fixes #6029
Fixes #6687

#6740 is still not fixed – we now expand `#[proc_macro_hack]`, but fail to expand the resulting `proc_macro_call!()` macro.

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
@bors bors bot closed this as completed in 1415367 Jun 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-hard fun A technically challenging issue with high impact
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants