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