fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
3.9 KiB95 linesraw
1error: float has excessive precision
2  --> $DIR/excessive_precision.rs:20:26
3   |
4LL |     const BAD32_1: f32 = 0.123_456_789_f32;
5   |                          ^^^^^^^^^^^^^^^^^ help: consider changing the type or truncating it to: `0.123_456_79_f32`
6   |
7   = note: `-D clippy::excessive-precision` implied by `-D warnings`
8   = help: to override `-D warnings` add `#[allow(clippy::excessive_precision)]`
9
10error: float has excessive precision
11  --> $DIR/excessive_precision.rs:21:26
12   |
13LL |     const BAD32_2: f32 = 0.123_456_789;
14   |                          ^^^^^^^^^^^^^ help: consider changing the type or truncating it to: `0.123_456_79`
15
16error: float has excessive precision
17  --> $DIR/excessive_precision.rs:22:26
18   |
19LL |     const BAD32_3: f32 = 0.100_000_000_000_1;
20   |                          ^^^^^^^^^^^^^^^^^^^ help: consider changing the type or truncating it to: `0.1`
21
22error: float has excessive precision
23  --> $DIR/excessive_precision.rs:23:29
24   |
25LL |     const BAD32_EDGE: f32 = 1.000_000_9;
26   |                             ^^^^^^^^^^^ help: consider changing the type or truncating it to: `1.000_001`
27
28error: float has excessive precision
29  --> $DIR/excessive_precision.rs:27:26
30   |
31LL |     const BAD64_3: f64 = 0.100_000_000_000_000_000_1;
32   |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the type or truncating it to: `0.1`
33
34error: float has excessive precision
35  --> $DIR/excessive_precision.rs:30:22
36   |
37LL |     println!("{:?}", 8.888_888_888_888_888_888_888);
38   |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the type or truncating it to: `8.888_888_888_888_89`
39
40error: float has excessive precision
41  --> $DIR/excessive_precision.rs:41:22
42   |
43LL |     let bad32: f32 = 1.123_456_789;
44   |                      ^^^^^^^^^^^^^ help: consider changing the type or truncating it to: `1.123_456_8`
45
46error: float has excessive precision
47  --> $DIR/excessive_precision.rs:42:26
48   |
49LL |     let bad32_suf: f32 = 1.123_456_789_f32;
50   |                          ^^^^^^^^^^^^^^^^^ help: consider changing the type or truncating it to: `1.123_456_8_f32`
51
52error: float has excessive precision
53  --> $DIR/excessive_precision.rs:43:21
54   |
55LL |     let bad32_inf = 1.123_456_789_f32;
56   |                     ^^^^^^^^^^^^^^^^^ help: consider changing the type or truncating it to: `1.123_456_8_f32`
57
58error: float has excessive precision
59  --> $DIR/excessive_precision.rs:53:36
60   |
61LL |     let bad_vec32: Vec<f32> = vec![0.123_456_789];
62   |                                    ^^^^^^^^^^^^^ help: consider changing the type or truncating it to: `0.123_456_79`
63
64error: float has excessive precision
65  --> $DIR/excessive_precision.rs:54:36
66   |
67LL |     let bad_vec64: Vec<f64> = vec![0.123_456_789_123_456_789];
68   |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the type or truncating it to: `0.123_456_789_123_456_78`
69
70error: float has excessive precision
71  --> $DIR/excessive_precision.rs:58:24
72   |
73LL |     let bad_e32: f32 = 1.123_456_788_888e-10;
74   |                        ^^^^^^^^^^^^^^^^^^^^^ help: consider changing the type or truncating it to: `1.123_456_8e-10`
75
76error: float has excessive precision
77  --> $DIR/excessive_precision.rs:61:27
78   |
79LL |     let bad_bige32: f32 = 1.123_456_788_888E-10;
80   |                           ^^^^^^^^^^^^^^^^^^^^^ help: consider changing the type or truncating it to: `1.123_456_8E-10`
81
82error: float has excessive precision
83  --> $DIR/excessive_precision.rs:70:13
84   |
85LL |     let _ = 2.225_073_858_507_201_1e-308_f64;
86   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the type or truncating it to: `2.225_073_858_507_201e-308_f64`
87
88error: float has excessive precision
89  --> $DIR/excessive_precision.rs:73:13
90   |
91LL |     let _ = 1.000_000_000_000_001e-324_f64;
92   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the type or truncating it to: `0_f64`
93
94error: aborting due to 15 previous errors
95