]> git.lizzy.rs Git - rust.git/blob - tests/ui/floating_point_abs.stderr
iterate List by value
[rust.git] / tests / ui / floating_point_abs.stderr
1 error: manual implementation of `abs` method
2   --> $DIR/floating_point_abs.rs:10:5
3    |
4 LL | /     if num >= 0.0 {
5 LL | |         num
6 LL | |     } else {
7 LL | |         -num
8 LL | |     }
9    | |_____^ help: try: `num.abs()`
10    |
11    = note: `-D clippy::suboptimal-flops` implied by `-D warnings`
12
13 error: manual implementation of `abs` method
14   --> $DIR/floating_point_abs.rs:18:5
15    |
16 LL | /     if 0.0 < num {
17 LL | |         num
18 LL | |     } else {
19 LL | |         -num
20 LL | |     }
21    | |_____^ help: try: `num.abs()`
22
23 error: manual implementation of `abs` method
24   --> $DIR/floating_point_abs.rs:26:5
25    |
26 LL | /     if a.a > 0.0 {
27 LL | |         a.a
28 LL | |     } else {
29 LL | |         -a.a
30 LL | |     }
31    | |_____^ help: try: `a.a.abs()`
32
33 error: manual implementation of `abs` method
34   --> $DIR/floating_point_abs.rs:34:5
35    |
36 LL | /     if 0.0 >= num {
37 LL | |         -num
38 LL | |     } else {
39 LL | |         num
40 LL | |     }
41    | |_____^ help: try: `num.abs()`
42
43 error: manual implementation of `abs` method
44   --> $DIR/floating_point_abs.rs:42:5
45    |
46 LL | /     if a.a < 0.0 {
47 LL | |         -a.a
48 LL | |     } else {
49 LL | |         a.a
50 LL | |     }
51    | |_____^ help: try: `a.a.abs()`
52
53 error: manual implementation of negation of `abs` method
54   --> $DIR/floating_point_abs.rs:50:5
55    |
56 LL | /     if num < 0.0 {
57 LL | |         num
58 LL | |     } else {
59 LL | |         -num
60 LL | |     }
61    | |_____^ help: try: `-num.abs()`
62
63 error: manual implementation of negation of `abs` method
64   --> $DIR/floating_point_abs.rs:58:5
65    |
66 LL | /     if 0.0 >= num {
67 LL | |         num
68 LL | |     } else {
69 LL | |         -num
70 LL | |     }
71    | |_____^ help: try: `-num.abs()`
72
73 error: manual implementation of negation of `abs` method
74   --> $DIR/floating_point_abs.rs:67:12
75    |
76 LL |         a: if a.a >= 0.0 { -a.a } else { a.a },
77    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `-a.a.abs()`
78
79 error: aborting due to 8 previous errors
80