-
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
feat: expand procedural attribute macros #9128
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jonas-schievink
changed the title
[WIP] feat: expand procedural attribute macros
feat: expand procedural attribute macros
Jun 3, 2021
bjorn3
reviewed
Jun 3, 2021
bors r+ |
bors bot
added a commit
that referenced
this pull request
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>
Build failed: |
bors r+ |
🥳 |
5 tasks
fixes my issue with webassembly book ty vm |
japaric
added a commit
to japaric/lsp-mode
that referenced
this pull request
Aug 20, 2021
this config flag was added in rust-lang/rust-analyzer#9128 when enabled, the existing `lsp-rust-analyzer-expand-macro` function will also expand proc macro attributes as this is an experimental feature, the default value of the setting is nil
brotzeit
pushed a commit
to emacs-lsp/lsp-mode
that referenced
this pull request
Aug 21, 2021
this config flag was added in rust-lang/rust-analyzer#9128 when enabled, the existing `lsp-rust-analyzer-expand-macro` function will also expand proc macro attributes as this is an experimental feature, the default value of the setting is nil
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds experimental support for attribute macros. They can be enabled by setting
rust-analyzer.experimental.procAttrMacros
totrue
.Known issues:
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 resultingproc_macro_call!()
macro.