blob: 8704f7bbd7c4e134db3fa2a5779598260abe350c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
|
error: floating-point arithmetic detected
--> tests/ui/float_arithmetic.rs:15:5
|
LL | f * 2.0;
| ^^^^^^^
|
= note: `-D clippy::float-arithmetic` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::float_arithmetic)]`
error: floating-point arithmetic detected
--> tests/ui/float_arithmetic.rs:20:5
|
LL | 1.0 + f;
| ^^^^^^^
error: floating-point arithmetic detected
--> tests/ui/float_arithmetic.rs:23:5
|
LL | f * 2.0;
| ^^^^^^^
error: floating-point arithmetic detected
--> tests/ui/float_arithmetic.rs:26:5
|
LL | f / 2.0;
| ^^^^^^^
error: floating-point arithmetic detected
--> tests/ui/float_arithmetic.rs:29:5
|
LL | f - 2.0 * 4.2;
| ^^^^^^^^^^^^^
error: floating-point arithmetic detected
--> tests/ui/float_arithmetic.rs:32:5
|
LL | -f;
| ^^
error: floating-point arithmetic detected
--> tests/ui/float_arithmetic.rs:36:5
|
LL | f += 1.0;
| ^^^^^^^^
error: floating-point arithmetic detected
--> tests/ui/float_arithmetic.rs:39:5
|
LL | f -= 1.0;
| ^^^^^^^^
error: floating-point arithmetic detected
--> tests/ui/float_arithmetic.rs:42:5
|
LL | f *= 2.0;
| ^^^^^^^^
error: floating-point arithmetic detected
--> tests/ui/float_arithmetic.rs:45:5
|
LL | f /= 2.0;
| ^^^^^^^^
error: floating-point arithmetic detected
--> tests/ui/float_arithmetic.rs:53:5
|
LL | 3.1_f32 + &1.2_f32;
| ^^^^^^^^^^^^^^^^^^
error: floating-point arithmetic detected
--> tests/ui/float_arithmetic.rs:56:5
|
LL | &3.4_f32 + 1.5_f32;
| ^^^^^^^^^^^^^^^^^^
error: floating-point arithmetic detected
--> tests/ui/float_arithmetic.rs:59:5
|
LL | &3.5_f32 + &1.3_f32;
| ^^^^^^^^^^^^^^^^^^^
error: floating-point arithmetic detected
--> tests/ui/float_arithmetic.rs:65:5
|
LL | a + f
| ^^^^^
error: floating-point arithmetic detected
--> tests/ui/float_arithmetic.rs:70:5
|
LL | f1 + f2
| ^^^^^^^
error: floating-point arithmetic detected
--> tests/ui/float_arithmetic.rs:75:5
|
LL | f1 + f2
| ^^^^^^^
error: floating-point arithmetic detected
--> tests/ui/float_arithmetic.rs:80:5
|
LL | (&f1 + &f2)
| ^^^^^^^^^^^
error: aborting due to 17 previous errors
|