-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Support macro metavar expressions #11952
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
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
# for free
to join this conversation on GitHub.
Already have an account?
# 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: