]> git.lizzy.rs Git - rust.git/blob - tests/ui/approx_const.rs
Adapt the *.stderr files of the ui-tests to the tool_lints
[rust.git] / tests / ui / approx_const.rs
1 #![feature(tool_lints)]
2
3
4 #[warn(clippy::approx_constant)]
5 #[allow(unused, clippy::shadow_unrelated, clippy::similar_names, clippy::unreadable_literal)]
6 fn main() {
7     let my_e = 2.7182;
8     let almost_e = 2.718;
9     let no_e = 2.71;
10
11     let my_1_frac_pi = 0.3183;
12     let no_1_frac_pi = 0.31;
13
14     let my_frac_1_sqrt_2 = 0.70710678;
15     let almost_frac_1_sqrt_2 = 0.70711;
16     let my_frac_1_sqrt_2 = 0.707;
17
18     let my_frac_2_pi = 0.63661977;
19     let no_frac_2_pi = 0.636;
20
21     let my_frac_2_sq_pi = 1.128379;
22     let no_frac_2_sq_pi = 1.128;
23
24     let my_frac_pi_2 = 1.57079632679;
25     let no_frac_pi_2 = 1.5705;
26
27     let my_frac_pi_3 = 1.04719755119;
28     let no_frac_pi_3 = 1.047;
29
30     let my_frac_pi_4 = 0.785398163397;
31     let no_frac_pi_4 = 0.785;
32
33     let my_frac_pi_6 = 0.523598775598;
34     let no_frac_pi_6 = 0.523;
35
36     let my_frac_pi_8 = 0.3926990816987;
37     let no_frac_pi_8 = 0.392;
38
39     let my_ln_10 = 2.302585092994046;
40     let no_ln_10 = 2.303;
41
42     let my_ln_2 = 0.6931471805599453;
43     let no_ln_2 = 0.693;
44
45     let my_log10_e = 0.4342944819032518;
46     let no_log10_e = 0.434;
47
48     let my_log2_e = 1.4426950408889634;
49     let no_log2_e = 1.442;
50
51     let my_pi = 3.1415;
52     let almost_pi = 3.14;
53     let no_pi = 3.15;
54
55     let my_sq2 = 1.4142;
56     let no_sq2 = 1.414;
57 }