d98e714988
fix incorrect suggestion in `suboptimal_flops` fixes #10003 There was an error when trying to negate an expression like `x - 1.0`. We used to format it as `-x - 1.0` whereas a proper negation would be `-(x - 1.0)`. Therefore, we add parentheses around the expression when it is `ExprKind::Binary`. We also add parentheses around multiply and divide expressions, even though this is not strictly necessary. changelog: [`suboptimal_flops`]: fix incorrect suggestion caused by an incorrect negation of floating point expressions. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
README.md |