rust/tests
bors d98e714988 Auto merge of #10113 - EricWu2003:suboptimal_flops_incorrect_suggestion, r=Jarcho
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.
2022-12-26 02:00:26 +00:00
..
test_utils
ui Auto merge of #10113 - EricWu2003:suboptimal_flops_incorrect_suggestion, r=Jarcho 2022-12-26 02:00:26 +00:00
ui-cargo Merge commit 'f4850f7292efa33759b4f7f9b7621268979e9914' into clippyup 2022-11-21 20:51:52 +01:00
ui-internal Merge remote-tracking branch 'upstream/master' into rustup 2022-12-17 13:56:32 +01:00
ui-toml Auto merge of #9840 - c410-f3r:arith-2, r=Alexendoo 2022-12-09 11:27:15 +00:00
workspace_test
check-fmt.rs
clippy.toml
compile-test.rs Merge commit '4f142aa1058f14f153f8bfd2d82f04ddb9982388' into clippyup 2022-10-23 15:18:45 +02:00
dogfood.rs Merge commit '4f142aa1058f14f153f8bfd2d82f04ddb9982388' into clippyup 2022-10-23 15:18:45 +02:00
integration.rs
lint_message_convention.rs
missing-test-files.rs
versioncheck.rs Cleanup rustc_tool_util and add a convenient macro for build.rs 2022-11-21 23:28:26 +01:00
workspace.rs