Wrong "unnecessary parentheses around function argument"-warning with macro in assignment and return positions #113563
Labels
A-lint
Area: Lints (warnings about flaws in source code) such as unused_mut.
C-bug
Category: This is a bug.
L-unused_parens
Lint: unused_parens
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I tried this code:
I expected to see this happen: No warnings
Instead, this happened:
This is an unexpected corner case of #47775 (assignment), and was not fixed by #47896. Assignment-expressions and block-return-expressions are affected:
In my actual use case, I can't do
0 + $num
. I don't think I have any idenity function available.Meta
rustc --version --verbose
:I still have a 1.36 install of rust, and that showed the same warning, so I think this has been around for a while.
The text was updated successfully, but these errors were encountered: