RS.CLIPPY.DOUBLE_PARENS
Warn on unnecessary double parentheses
This checker is a Clippy lint created by The Rust Project Contributors. The documentation shown here is a copy of the original documentation for: double_parens. Copyright ©2025 The Rust Team. All rights reserved.
What it does
Checks for unnecessary double parentheses.
Why is this bad?
This makes code harder to read and might indicate a mistake.
Example
fn simple_double_parens() -> i32 {
((0))
}
foo((0));
Use instead:
fn simple_no_parens() -> i32 {
0
}
foo(0);