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