mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-05 03:23:25 +00:00
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. |
||
---|---|---|
.. | ||
test_utils | ||
ui | ||
ui-cargo | ||
ui-internal | ||
ui-toml | ||
workspace_test | ||
check-fmt.rs | ||
clippy.toml | ||
compile-test.rs | ||
dogfood.rs | ||
integration.rs | ||
lint_message_convention.rs | ||
missing-test-files.rs | ||
versioncheck.rs | ||
workspace.rs |