]> git.proxmox.com Git - rustc.git/blame - src/tools/clippy/tests/ui/floating_point_abs.stderr
Update upstream source from tag 'upstream/1.52.1+dfsg1'
[rustc.git] / src / tools / clippy / tests / ui / floating_point_abs.stderr
CommitLineData
f20569fa
XL
1error: manual implementation of `abs` method
2 --> $DIR/floating_point_abs.rs:10: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
9error: manual implementation of `abs` method
10 --> $DIR/floating_point_abs.rs:14:5
11 |
12LL | if 0.0 < num { num } else { -num }
13 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `num.abs()`
14
15error: manual implementation of `abs` method
16 --> $DIR/floating_point_abs.rs:18:5
17 |
18LL | if a.a > 0.0 { a.a } else { -a.a }
19 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `a.a.abs()`
20
21error: manual implementation of `abs` method
22 --> $DIR/floating_point_abs.rs:22:5
23 |
24LL | if 0.0 >= num { -num } else { num }
25 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `num.abs()`
26
27error: manual implementation of `abs` method
28 --> $DIR/floating_point_abs.rs:26:5
29 |
30LL | if a.a < 0.0 { -a.a } else { a.a }
31 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `a.a.abs()`
32
33error: manual implementation of negation of `abs` method
34 --> $DIR/floating_point_abs.rs:30:5
35 |
36LL | if num < 0.0 { num } else { -num }
37 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `-num.abs()`
38
39error: manual implementation of negation of `abs` method
40 --> $DIR/floating_point_abs.rs:34:5
41 |
42LL | if 0.0 >= num { num } else { -num }
43 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `-num.abs()`
44
45error: manual implementation of negation of `abs` method
46 --> $DIR/floating_point_abs.rs:39:12
47 |
48LL | a: if a.a >= 0.0 { -a.a } else { a.a },
49 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `-a.a.abs()`
50
51error: aborting due to 8 previous errors
52