-
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
Support macro metavar expressions #11952
Comments
jonas-schievink
added
C-feature
Category: feature request
and removed
C-support
Category: support questions
labels
Apr 10, 2022
At least for |
Go ahead! |
TimNN
added a commit
to TimNN/rust-analyzer
that referenced
this issue
Jun 2, 2022
The implementation mirrors what `rustc` currently does [1]. Part of rust-lang#11952. [1]: https://github.com/rust-lang/rust/blob/0595ea1d12cf745e0a672d05341429ecb0917e66/compiler/rustc_expand/src/mbe/quoted.rs#L230-L241
bors
added a commit
that referenced
this issue
Jun 3, 2022
feat: Support `$$` in macros. The implementation mirrors what `rustc` currently does [1]. Part of #11952. \[1]: https://github.com/rust-lang/rust/blob/0595ea1d12cf745e0a672d05341429ecb0917e66/compiler/rustc_expand/src/mbe/quoted.rs#L230-L241
This was referenced May 22, 2023
bors
added a commit
that referenced
this issue
May 28, 2023
Implement `${count()}` metavariable expression This PR implements `${count()}` metavariable expression for MBE as described in [RFC 3086][rfc]. See [this section][sec-count] of the RFC for its semantics. Additionally, this PR changes the type of depth parameter of `${index()}` from u32 to usize so as to match how [rustc parses it][index-usize]. Part of #11952 Fixes #14871 [rfc]: rust-lang/rfcs#3086 [sec-count]: https://github.com/rust-lang/rfcs/blob/master/text/3086-macro-metavar-expr.md#count [index-usize]:https://github.com/rust-lang/rust/blob/ddad0576caf8d0515ed453e04b468977c7d3dfc1/compiler/rustc_expand/src/mbe/metavar_expr.rs#L22
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A subset is being stabilized soon rust-lang/rust#95860
RFC https://github.com/rust-lang/rfcs/blob/master/text/3086-macro-metavar-expr.md#dollar-dollar
The text was updated successfully, but these errors were encountered: