You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
unused_parens false positive on braced macro calls #78747
Activity
apiraino commentedon Nov 5, 2020
Assigning
P-mediumas discussed as part of the Prioritization Working Group procedure and removingI-prioritize.Aaron1011 commentedon Nov 7, 2020
Note that the parenthesis are required due to the fact that we have special handling for macro invocations with curly braces:
rust/compiler/rustc_parse/src/parser/stmt.rs
Lines 108 to 111 in b2d115f
Without the parenthesis, we parse
x!{}as a statement, not an expression. However,x!().to_string()(without any surrounding parenthesis) compiles.kawadakk commentedon Dec 20, 2021
The suggestion is valid as of #88690 (included in 1.57.0).