Fixes: rust-lang/rust-clippy#14897, rust-lang/rust-clippy#10015 This is not a perfect solution, but it fixes the issue. Happy to discuss further with the clippy team. This PR refines check_mul_add to avoid false positives on ambiguous float types (e.g., f32 vs f64). It improves type detection and ensures mul_add is only suggested when the type is clear. Changes: - Improved detection of ambiguous float types - Refined mul_add suggestion logic - Added tests for ambiguous cases ## Example Before this change, expressions like: ```rust let x = 1.0; // ambiguous type let _ = x * 2.0 + 0.5; // could incorrectly suggest mul_add ``` ---- changelog: [`suboptimal_flops`]: improve handling of ambiguous float types in mul_add suggestions |
||
|---|---|---|
| .. | ||
| test_utils | ||
| ui | ||
| ui-cargo | ||
| ui-internal | ||
| ui-toml | ||
| workspace_test | ||
| check-fmt.rs | ||
| clippy.toml | ||
| compile-test.rs | ||
| config-metadata.rs | ||
| dogfood.rs | ||
| integration.rs | ||
| lint_message_convention.rs | ||
| missing-test-files.rs | ||
| symbols-used.rs | ||
| versioncheck.rs | ||
| workspace.rs | ||