fork/rust

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

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

master
3.3 KiB71 linesraw
1error: literal cannot be represented as the underlying type without loss of precision
2  --> $DIR/lossy_float_literal.rs:6:18
3   |
4LL |     let _: f32 = 16_777_217.0;
5   |                  ^^^^^^^^^^^^ help: consider changing the type or replacing it with: `16_777_216.0`
6   |
7   = note: `-D clippy::lossy-float-literal` implied by `-D warnings`
8   = help: to override `-D warnings` add `#[allow(clippy::lossy_float_literal)]`
9
10error: literal cannot be represented as the underlying type without loss of precision
11  --> $DIR/lossy_float_literal.rs:7:18
12   |
13LL |     let _: f32 = 16_777_219.0;
14   |                  ^^^^^^^^^^^^ help: consider changing the type or replacing it with: `16_777_220.0`
15
16error: literal cannot be represented as the underlying type without loss of precision
17  --> $DIR/lossy_float_literal.rs:8:18
18   |
19LL |     let _: f32 = 16_777_219.;
20   |                  ^^^^^^^^^^^ help: consider changing the type or replacing it with: `16_777_220.0`
21
22error: literal cannot be represented as the underlying type without loss of precision
23  --> $DIR/lossy_float_literal.rs:9:18
24   |
25LL |     let _: f32 = 16_777_219.000;
26   |                  ^^^^^^^^^^^^^^ help: consider changing the type or replacing it with: `16_777_220.0`
27
28error: literal cannot be represented as the underlying type without loss of precision
29  --> $DIR/lossy_float_literal.rs:10:13
30   |
31LL |     let _ = 16_777_219f32;
32   |             ^^^^^^^^^^^^^ help: consider changing the type or replacing it with: `16_777_220_f32`
33
34error: literal cannot be represented as the underlying type without loss of precision
35  --> $DIR/lossy_float_literal.rs:11:19
36   |
37LL |     let _: f32 = -16_777_219.0;
38   |                   ^^^^^^^^^^^^ help: consider changing the type or replacing it with: `16_777_220.0`
39
40error: literal cannot be represented as the underlying type without loss of precision
41  --> $DIR/lossy_float_literal.rs:12:18
42   |
43LL |     let _: f64 = 9_007_199_254_740_993.0;
44   |                  ^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the type or replacing it with: `9_007_199_254_740_992.0`
45
46error: literal cannot be represented as the underlying type without loss of precision
47  --> $DIR/lossy_float_literal.rs:13:18
48   |
49LL |     let _: f64 = 9_007_199_254_740_993.;
50   |                  ^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the type or replacing it with: `9_007_199_254_740_992.0`
51
52error: literal cannot be represented as the underlying type without loss of precision
53  --> $DIR/lossy_float_literal.rs:14:18
54   |
55LL |     let _: f64 = 9_007_199_254_740_993.00;
56   |                  ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the type or replacing it with: `9_007_199_254_740_992.0`
57
58error: literal cannot be represented as the underlying type without loss of precision
59  --> $DIR/lossy_float_literal.rs:15:13
60   |
61LL |     let _ = 9_007_199_254_740_993f64;
62   |             ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the type or replacing it with: `9_007_199_254_740_992_f64`
63
64error: literal cannot be represented as the underlying type without loss of precision
65  --> $DIR/lossy_float_literal.rs:16:19
66   |
67LL |     let _: f64 = -9_007_199_254_740_993.0;
68   |                   ^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the type or replacing it with: `9_007_199_254_740_992.0`
69
70error: aborting due to 11 previous errors
71