|
1 |
| -error: approximate value of `f{32, 64}::consts::E` found. Consider using it directly |
| 1 | +error: approximate value of `f{32, 64}::consts::E` found |
2 | 2 | --> $DIR/approx_const.rs:4:16
|
3 | 3 | |
|
4 | 4 | LL | let my_e = 2.7182;
|
5 | 5 | | ^^^^^^
|
6 | 6 | |
|
7 | 7 | = note: `-D clippy::approx-constant` implied by `-D warnings`
|
| 8 | + = help: consider using the constant directly |
8 | 9 |
|
9 |
| -error: approximate value of `f{32, 64}::consts::E` found. Consider using it directly |
| 10 | +error: approximate value of `f{32, 64}::consts::E` found |
10 | 11 | --> $DIR/approx_const.rs:5:20
|
11 | 12 | |
|
12 | 13 | LL | let almost_e = 2.718;
|
13 | 14 | | ^^^^^
|
| 15 | + | |
| 16 | + = help: consider using the constant directly |
14 | 17 |
|
15 |
| -error: approximate value of `f{32, 64}::consts::FRAC_1_PI` found. Consider using it directly |
| 18 | +error: approximate value of `f{32, 64}::consts::FRAC_1_PI` found |
16 | 19 | --> $DIR/approx_const.rs:8:24
|
17 | 20 | |
|
18 | 21 | LL | let my_1_frac_pi = 0.3183;
|
19 | 22 | | ^^^^^^
|
| 23 | + | |
| 24 | + = help: consider using the constant directly |
20 | 25 |
|
21 |
| -error: approximate value of `f{32, 64}::consts::FRAC_1_SQRT_2` found. Consider using it directly |
| 26 | +error: approximate value of `f{32, 64}::consts::FRAC_1_SQRT_2` found |
22 | 27 | --> $DIR/approx_const.rs:11:28
|
23 | 28 | |
|
24 | 29 | LL | let my_frac_1_sqrt_2 = 0.70710678;
|
25 | 30 | | ^^^^^^^^^^
|
| 31 | + | |
| 32 | + = help: consider using the constant directly |
26 | 33 |
|
27 |
| -error: approximate value of `f{32, 64}::consts::FRAC_1_SQRT_2` found. Consider using it directly |
| 34 | +error: approximate value of `f{32, 64}::consts::FRAC_1_SQRT_2` found |
28 | 35 | --> $DIR/approx_const.rs:12:32
|
29 | 36 | |
|
30 | 37 | LL | let almost_frac_1_sqrt_2 = 0.70711;
|
31 | 38 | | ^^^^^^^
|
| 39 | + | |
| 40 | + = help: consider using the constant directly |
32 | 41 |
|
33 |
| -error: approximate value of `f{32, 64}::consts::FRAC_2_PI` found. Consider using it directly |
| 42 | +error: approximate value of `f{32, 64}::consts::FRAC_2_PI` found |
34 | 43 | --> $DIR/approx_const.rs:15:24
|
35 | 44 | |
|
36 | 45 | LL | let my_frac_2_pi = 0.63661977;
|
37 | 46 | | ^^^^^^^^^^
|
| 47 | + | |
| 48 | + = help: consider using the constant directly |
38 | 49 |
|
39 |
| -error: approximate value of `f{32, 64}::consts::FRAC_2_SQRT_PI` found. Consider using it directly |
| 50 | +error: approximate value of `f{32, 64}::consts::FRAC_2_SQRT_PI` found |
40 | 51 | --> $DIR/approx_const.rs:18:27
|
41 | 52 | |
|
42 | 53 | LL | let my_frac_2_sq_pi = 1.128379;
|
43 | 54 | | ^^^^^^^^
|
| 55 | + | |
| 56 | + = help: consider using the constant directly |
44 | 57 |
|
45 |
| -error: approximate value of `f{32, 64}::consts::FRAC_PI_2` found. Consider using it directly |
| 58 | +error: approximate value of `f{32, 64}::consts::FRAC_PI_2` found |
46 | 59 | --> $DIR/approx_const.rs:21:24
|
47 | 60 | |
|
48 | 61 | LL | let my_frac_pi_2 = 1.57079632679;
|
49 | 62 | | ^^^^^^^^^^^^^
|
| 63 | + | |
| 64 | + = help: consider using the constant directly |
50 | 65 |
|
51 |
| -error: approximate value of `f{32, 64}::consts::FRAC_PI_3` found. Consider using it directly |
| 66 | +error: approximate value of `f{32, 64}::consts::FRAC_PI_3` found |
52 | 67 | --> $DIR/approx_const.rs:24:24
|
53 | 68 | |
|
54 | 69 | LL | let my_frac_pi_3 = 1.04719755119;
|
55 | 70 | | ^^^^^^^^^^^^^
|
| 71 | + | |
| 72 | + = help: consider using the constant directly |
56 | 73 |
|
57 |
| -error: approximate value of `f{32, 64}::consts::FRAC_PI_4` found. Consider using it directly |
| 74 | +error: approximate value of `f{32, 64}::consts::FRAC_PI_4` found |
58 | 75 | --> $DIR/approx_const.rs:27:24
|
59 | 76 | |
|
60 | 77 | LL | let my_frac_pi_4 = 0.785398163397;
|
61 | 78 | | ^^^^^^^^^^^^^^
|
| 79 | + | |
| 80 | + = help: consider using the constant directly |
62 | 81 |
|
63 |
| -error: approximate value of `f{32, 64}::consts::FRAC_PI_6` found. Consider using it directly |
| 82 | +error: approximate value of `f{32, 64}::consts::FRAC_PI_6` found |
64 | 83 | --> $DIR/approx_const.rs:30:24
|
65 | 84 | |
|
66 | 85 | LL | let my_frac_pi_6 = 0.523598775598;
|
67 | 86 | | ^^^^^^^^^^^^^^
|
| 87 | + | |
| 88 | + = help: consider using the constant directly |
68 | 89 |
|
69 |
| -error: approximate value of `f{32, 64}::consts::FRAC_PI_8` found. Consider using it directly |
| 90 | +error: approximate value of `f{32, 64}::consts::FRAC_PI_8` found |
70 | 91 | --> $DIR/approx_const.rs:33:24
|
71 | 92 | |
|
72 | 93 | LL | let my_frac_pi_8 = 0.3926990816987;
|
73 | 94 | | ^^^^^^^^^^^^^^^
|
| 95 | + | |
| 96 | + = help: consider using the constant directly |
74 | 97 |
|
75 |
| -error: approximate value of `f{32, 64}::consts::LN_10` found. Consider using it directly |
| 98 | +error: approximate value of `f{32, 64}::consts::LN_10` found |
76 | 99 | --> $DIR/approx_const.rs:36:20
|
77 | 100 | |
|
78 | 101 | LL | let my_ln_10 = 2.302585092994046;
|
79 | 102 | | ^^^^^^^^^^^^^^^^^
|
| 103 | + | |
| 104 | + = help: consider using the constant directly |
80 | 105 |
|
81 |
| -error: approximate value of `f{32, 64}::consts::LN_2` found. Consider using it directly |
| 106 | +error: approximate value of `f{32, 64}::consts::LN_2` found |
82 | 107 | --> $DIR/approx_const.rs:39:19
|
83 | 108 | |
|
84 | 109 | LL | let my_ln_2 = 0.6931471805599453;
|
85 | 110 | | ^^^^^^^^^^^^^^^^^^
|
| 111 | + | |
| 112 | + = help: consider using the constant directly |
86 | 113 |
|
87 |
| -error: approximate value of `f{32, 64}::consts::LOG10_E` found. Consider using it directly |
| 114 | +error: approximate value of `f{32, 64}::consts::LOG10_E` found |
88 | 115 | --> $DIR/approx_const.rs:42:22
|
89 | 116 | |
|
90 | 117 | LL | let my_log10_e = 0.4342944819032518;
|
91 | 118 | | ^^^^^^^^^^^^^^^^^^
|
| 119 | + | |
| 120 | + = help: consider using the constant directly |
92 | 121 |
|
93 |
| -error: approximate value of `f{32, 64}::consts::LOG2_E` found. Consider using it directly |
| 122 | +error: approximate value of `f{32, 64}::consts::LOG2_E` found |
94 | 123 | --> $DIR/approx_const.rs:45:21
|
95 | 124 | |
|
96 | 125 | LL | let my_log2_e = 1.4426950408889634;
|
97 | 126 | | ^^^^^^^^^^^^^^^^^^
|
| 127 | + | |
| 128 | + = help: consider using the constant directly |
98 | 129 |
|
99 |
| -error: approximate value of `f{32, 64}::consts::LOG2_10` found. Consider using it directly |
| 130 | +error: approximate value of `f{32, 64}::consts::LOG2_10` found |
100 | 131 | --> $DIR/approx_const.rs:48:19
|
101 | 132 | |
|
102 | 133 | LL | let log2_10 = 3.321928094887362;
|
103 | 134 | | ^^^^^^^^^^^^^^^^^
|
| 135 | + | |
| 136 | + = help: consider using the constant directly |
104 | 137 |
|
105 |
| -error: approximate value of `f{32, 64}::consts::LOG10_2` found. Consider using it directly |
| 138 | +error: approximate value of `f{32, 64}::consts::LOG10_2` found |
106 | 139 | --> $DIR/approx_const.rs:51:19
|
107 | 140 | |
|
108 | 141 | LL | let log10_2 = 0.301029995663981;
|
109 | 142 | | ^^^^^^^^^^^^^^^^^
|
| 143 | + | |
| 144 | + = help: consider using the constant directly |
110 | 145 |
|
111 |
| -error: approximate value of `f{32, 64}::consts::PI` found. Consider using it directly |
| 146 | +error: approximate value of `f{32, 64}::consts::PI` found |
112 | 147 | --> $DIR/approx_const.rs:54:17
|
113 | 148 | |
|
114 | 149 | LL | let my_pi = 3.1415;
|
115 | 150 | | ^^^^^^
|
| 151 | + | |
| 152 | + = help: consider using the constant directly |
116 | 153 |
|
117 |
| -error: approximate value of `f{32, 64}::consts::PI` found. Consider using it directly |
| 154 | +error: approximate value of `f{32, 64}::consts::PI` found |
118 | 155 | --> $DIR/approx_const.rs:55:21
|
119 | 156 | |
|
120 | 157 | LL | let almost_pi = 3.14;
|
121 | 158 | | ^^^^
|
| 159 | + | |
| 160 | + = help: consider using the constant directly |
122 | 161 |
|
123 |
| -error: approximate value of `f{32, 64}::consts::SQRT_2` found. Consider using it directly |
| 162 | +error: approximate value of `f{32, 64}::consts::SQRT_2` found |
124 | 163 | --> $DIR/approx_const.rs:58:18
|
125 | 164 | |
|
126 | 165 | LL | let my_sq2 = 1.4142;
|
127 | 166 | | ^^^^^^
|
| 167 | + | |
| 168 | + = help: consider using the constant directly |
128 | 169 |
|
129 | 170 | error: aborting due to 21 previous errors
|
130 | 171 |
|
0 commit comments