mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-28 19:46:01 +00:00
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`