]> git.lizzy.rs Git - rust.git/blob - tests/ui/floating_point_powi.stderr
Auto merge of #9684 - kraktus:ref_option_ref, r=xFrednet
[rust.git] / tests / ui / floating_point_powi.stderr
1 error: multiply and add expressions can be calculated more efficiently and accurately
2   --> $DIR/floating_point_powi.rs:10:13
3    |
4 LL |     let _ = x.powi(2) + y;
5    |             ^^^^^^^^^^^^^ help: consider using: `x.mul_add(x, y)`
6    |
7    = note: `-D clippy::suboptimal-flops` implied by `-D warnings`
8
9 error: multiply and add expressions can be calculated more efficiently and accurately
10   --> $DIR/floating_point_powi.rs:11:13
11    |
12 LL |     let _ = x.powi(2) - y;
13    |             ^^^^^^^^^^^^^ help: consider using: `x.mul_add(x, -y)`
14
15 error: multiply and add expressions can be calculated more efficiently and accurately
16   --> $DIR/floating_point_powi.rs:12:13
17    |
18 LL |     let _ = x + y.powi(2);
19    |             ^^^^^^^^^^^^^ help: consider using: `y.mul_add(y, x)`
20
21 error: multiply and add expressions can be calculated more efficiently and accurately
22   --> $DIR/floating_point_powi.rs:13:13
23    |
24 LL |     let _ = x - y.powi(2);
25    |             ^^^^^^^^^^^^^ help: consider using: `y.mul_add(-y, x)`
26
27 error: multiply and add expressions can be calculated more efficiently and accurately
28   --> $DIR/floating_point_powi.rs:14:13
29    |
30 LL |     let _ = x + (y as f32).powi(2);
31    |             ^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `(y as f32).mul_add(y as f32, x)`
32
33 error: multiply and add expressions can be calculated more efficiently and accurately
34   --> $DIR/floating_point_powi.rs:15:13
35    |
36 LL |     let _ = (x.powi(2) + y).sqrt();
37    |             ^^^^^^^^^^^^^^^ help: consider using: `x.mul_add(x, y)`
38
39 error: multiply and add expressions can be calculated more efficiently and accurately
40   --> $DIR/floating_point_powi.rs:16:13
41    |
42 LL |     let _ = (x + y.powi(2)).sqrt();
43    |             ^^^^^^^^^^^^^^^ help: consider using: `y.mul_add(y, x)`
44
45 error: aborting due to 7 previous errors
46