11error: multiply and add expressions can be calculated more efficiently and accurately
2- --> tests/ui/floating_point_mul_add.rs:20 :13
2+ --> tests/ui/floating_point_mul_add.rs:19 :13
33 |
44LL | let _ = a * b + c;
55 | ^^^^^^^^^ help: consider using: `a.mul_add(b, c)`
@@ -8,73 +8,73 @@ LL | let _ = a * b + c;
88 = help: to override `-D warnings` add `#[allow(clippy::suboptimal_flops)]`
99
1010error: multiply and add expressions can be calculated more efficiently and accurately
11- --> tests/ui/floating_point_mul_add.rs:21 :13
11+ --> tests/ui/floating_point_mul_add.rs:20 :13
1212 |
1313LL | let _ = a * b - c;
1414 | ^^^^^^^^^ help: consider using: `a.mul_add(b, -c)`
1515
1616error: multiply and add expressions can be calculated more efficiently and accurately
17- --> tests/ui/floating_point_mul_add.rs:22 :13
17+ --> tests/ui/floating_point_mul_add.rs:21 :13
1818 |
1919LL | let _ = c + a * b;
2020 | ^^^^^^^^^ help: consider using: `a.mul_add(b, c)`
2121
2222error: multiply and add expressions can be calculated more efficiently and accurately
23- --> tests/ui/floating_point_mul_add.rs:23 :13
23+ --> tests/ui/floating_point_mul_add.rs:22 :13
2424 |
2525LL | let _ = c - a * b;
2626 | ^^^^^^^^^ help: consider using: `a.mul_add(-b, c)`
2727
2828error: multiply and add expressions can be calculated more efficiently and accurately
29- --> tests/ui/floating_point_mul_add.rs:24 :13
29+ --> tests/ui/floating_point_mul_add.rs:23 :13
3030 |
3131LL | let _ = a + 2.0 * 4.0;
3232 | ^^^^^^^^^^^^^ help: consider using: `2.0f64.mul_add(4.0, a)`
3333
3434error: multiply and add expressions can be calculated more efficiently and accurately
35- --> tests/ui/floating_point_mul_add.rs:25 :13
35+ --> tests/ui/floating_point_mul_add.rs:24 :13
3636 |
3737LL | let _ = a + 2. * 4.;
3838 | ^^^^^^^^^^^ help: consider using: `2.0f64.mul_add(4., a)`
3939
4040error: multiply and add expressions can be calculated more efficiently and accurately
41- --> tests/ui/floating_point_mul_add.rs:27 :13
41+ --> tests/ui/floating_point_mul_add.rs:26 :13
4242 |
4343LL | let _ = (a * b) + c;
4444 | ^^^^^^^^^^^ help: consider using: `a.mul_add(b, c)`
4545
4646error: multiply and add expressions can be calculated more efficiently and accurately
47- --> tests/ui/floating_point_mul_add.rs:28 :13
47+ --> tests/ui/floating_point_mul_add.rs:27 :13
4848 |
4949LL | let _ = c + (a * b);
5050 | ^^^^^^^^^^^ help: consider using: `a.mul_add(b, c)`
5151
5252error: multiply and add expressions can be calculated more efficiently and accurately
53- --> tests/ui/floating_point_mul_add.rs:29 :13
53+ --> tests/ui/floating_point_mul_add.rs:28 :13
5454 |
5555LL | let _ = a * b * c + d;
5656 | ^^^^^^^^^^^^^ help: consider using: `(a * b).mul_add(c, d)`
5757
5858error: multiply and add expressions can be calculated more efficiently and accurately
59- --> tests/ui/floating_point_mul_add.rs:31 :13
59+ --> tests/ui/floating_point_mul_add.rs:30 :13
6060 |
6161LL | let _ = a.mul_add(b, c) * a.mul_add(b, c) + a.mul_add(b, c) + c;
6262 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `a.mul_add(b, c).mul_add(a.mul_add(b, c), a.mul_add(b, c))`
6363
6464error: multiply and add expressions can be calculated more efficiently and accurately
65- --> tests/ui/floating_point_mul_add.rs:32 :13
65+ --> tests/ui/floating_point_mul_add.rs:31 :13
6666 |
6767LL | let _ = 1234.567_f64 * 45.67834_f64 + 0.0004_f64;
6868 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `1234.567_f64.mul_add(45.67834_f64, 0.0004_f64)`
6969
7070error: multiply and add expressions can be calculated more efficiently and accurately
71- --> tests/ui/floating_point_mul_add.rs:34 :13
71+ --> tests/ui/floating_point_mul_add.rs:33 :13
7272 |
7373LL | let _ = (a * a + b).sqrt();
7474 | ^^^^^^^^^^^ help: consider using: `a.mul_add(a, b)`
7575
7676error: multiply and add expressions can be calculated more efficiently and accurately
77- --> tests/ui/floating_point_mul_add.rs:37 :13
77+ --> tests/ui/floating_point_mul_add.rs:36 :13
7878 |
7979LL | let _ = a - (b * u as f64);
8080 | ^^^^^^^^^^^^^^^^^^ help: consider using: `b.mul_add(-(u as f64), a)`
0 commit comments