unused_parens false positive on braced macro calls #78747
Labels
A-lints
Area: Lints (warnings about flaws in source code) such as unused_mut.
A-macros
Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)
C-bug
Category: This is a bug.
P-medium
Medium priority
regression-from-stable-to-stable
Performance or correctness regression from one stable version to another.
I tried this code:
I expected to see this happen: No warning about unnecessary parens
Instead, this happened: A warning about unnecessary parens suggesting to remove parens. Attempting to actually follow the advice causes an error.
This can be worked around by using
x!().to_string
or(x! {}).to_string()
instead, however this shouldn't be necessary as the original code is fine.This happens since Rust 1.42.
Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: