about summary refs log tree commit diff
path: root/compiler/rustc_parse/src
diff options
context:
space:
mode:
authorStuart Cook <Zalathar@users.noreply.github.com>2025-05-02 22:16:57 +1000
committerGitHub <noreply@github.com>2025-05-02 22:16:57 +1000
commit96852e24942b31fd45995a39836b7da389963c62 (patch)
tree75ece15ee4607277f8c638e88885d371911f81a7 /compiler/rustc_parse/src
parentdb074a06fe6649f9455dff8ad3eddd60683036f3 (diff)
parente9d2fefe0cfa083965b83288f38e408df7f1cdd1 (diff)
downloadrust-96852e24942b31fd45995a39836b7da389963c62.tar.gz
rust-96852e24942b31fd45995a39836b7da389963c62.zip
Rollup merge of #134034 - bvanjoi:issue-131655, r=petrochenkov
handle paren in macro expand for let-init-else expr

Fixes #131655

This PR modifies the codegen logic of the macro expansion within `let-init-else` expression:
- Before: The expression `let xxx = (mac! {}) else {}` expands to `let xxx = (expanded_ast) else {}`.
- After: The same expression expands to `let xxx = expanded_ast else {}`.

An alternative solution to this issue could involve handling the source code directly when encountering unused parentheses in `let-init-else` expressions. However, this approach might be more cumbersome due to the absence of the necessary data structure.

r? `@petrochenkov`
Diffstat (limited to 'compiler/rustc_parse/src')
0 files changed, 0 insertions, 0 deletions