-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Fix macro_rules not accepting brackets or parentheses #7027
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
Conversation
|
let's put a [,( test directly over the match arm, as opposed to over the
function
…On Thu, 24 Dec 2020 at 11:27, Lukas Wirth ***@***.***> wrote:
------------------------------
You can view, comment on, or merge this pull request online at:
#7027
Commit Summary
- Fix macro_rules not accepting brackets or parentheses
File Changes
- *M* crates/parser/src/grammar/items.rs
<https://github.com/rust-analyzer/rust-analyzer/pull/7027/files#diff-f4d4ad8964b6af5b78d3621d38b5553cd93c317741b29a6c85964a6277b59a16>
(10)
- *A* crates/syntax/test_data/parser/inline/ok/0158_macro_rules.rast
<https://github.com/rust-analyzer/rust-analyzer/pull/7027/files#diff-a4061fa70c30b3d4597f1dfdf04744a036d9d793be31212bce1a9531a0afd751>
(84)
- *A* crates/syntax/test_data/parser/inline/ok/0158_macro_rules.rs
<https://github.com/rust-analyzer/rust-analyzer/pull/7027/files#diff-20f16a248a8ca8ace186b03711f4f31ba5e9da46738117f7b182b977d2fc00d5>
(3)
Patch Links:
- https://github.com/rust-analyzer/rust-analyzer/pull/7027.patch
- https://github.com/rust-analyzer/rust-analyzer/pull/7027.diff
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#7027>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AANB3M3XIS245PSHCLXTTSTSWL3QFANCNFSM4VH6NBOQ>
.
|
| T!['{'] => { | ||
| T!['['] | T!['('] => { | ||
| token_tree(p); | ||
| p.expect(T![;]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh, TIL.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only {}, []; and (); macro invocations are allowed to produce items, hence you also need the semi here.
|
bors r+ |
|
bors r- |
|
Canceled. |
|
bors r=matklad,lnicola |
No description provided.