fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.8 KiB53 linesraw
1error: manual implementation of `abs` method
2  --> $DIR/floating_point_abs.rs:15:5
3   |
4LL |     if num >= 0.0 { num } else { -num }
5   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `num.abs()`
6   |
7   = note: `-D clippy::suboptimal-flops` implied by `-D warnings`
8   = help: to override `-D warnings` add `#[allow(clippy::suboptimal_flops)]`
9
10error: manual implementation of `abs` method
11  --> $DIR/floating_point_abs.rs:19:5
12   |
13LL |     if 0.0 < num { num } else { -num }
14   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `num.abs()`
15
16error: manual implementation of `abs` method
17  --> $DIR/floating_point_abs.rs:23:5
18   |
19LL |     if a.a > 0.0 { a.a } else { -a.a }
20   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `a.a.abs()`
21
22error: manual implementation of `abs` method
23  --> $DIR/floating_point_abs.rs:27:5
24   |
25LL |     if 0.0 >= num { -num } else { num }
26   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `num.abs()`
27
28error: manual implementation of `abs` method
29  --> $DIR/floating_point_abs.rs:31:5
30   |
31LL |     if a.a < 0.0 { -a.a } else { a.a }
32   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `a.a.abs()`
33
34error: manual implementation of negation of `abs` method
35  --> $DIR/floating_point_abs.rs:35:5
36   |
37LL |     if num < 0.0 { num } else { -num }
38   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `-num.abs()`
39
40error: manual implementation of negation of `abs` method
41  --> $DIR/floating_point_abs.rs:39:5
42   |
43LL |     if 0.0 >= num { num } else { -num }
44   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `-num.abs()`
45
46error: manual implementation of negation of `abs` method
47  --> $DIR/floating_point_abs.rs:44:12
48   |
49LL |         a: if a.a >= 0.0 { -a.a } else { a.a },
50   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `-a.a.abs()`
51
52error: aborting due to 8 previous errors
53