2020-02-20 20:32:06 -06:00
|
|
|
error: literal cannot be represented as the underlying type without loss of precision
|
2023-06-14 07:12:25 -05:00
|
|
|
--> $DIR/lossy_float_literal.rs:7:18
|
2020-02-20 20:32:06 -06:00
|
|
|
|
|
|
|
|
LL | let _: f32 = 16_777_217.0;
|
|
|
|
| ^^^^^^^^^^^^ help: consider changing the type or replacing it with: `16_777_216.0`
|
|
|
|
|
|
|
|
|
= note: `-D clippy::lossy-float-literal` implied by `-D warnings`
|
|
|
|
|
|
|
|
error: literal cannot be represented as the underlying type without loss of precision
|
2023-06-14 07:12:25 -05:00
|
|
|
--> $DIR/lossy_float_literal.rs:8:18
|
2020-02-20 20:32:06 -06:00
|
|
|
|
|
|
|
|
LL | let _: f32 = 16_777_219.0;
|
|
|
|
| ^^^^^^^^^^^^ help: consider changing the type or replacing it with: `16_777_220.0`
|
|
|
|
|
|
|
|
error: literal cannot be represented as the underlying type without loss of precision
|
2023-06-14 07:12:25 -05:00
|
|
|
--> $DIR/lossy_float_literal.rs:9:18
|
2020-02-20 20:32:06 -06:00
|
|
|
|
|
|
|
|
LL | let _: f32 = 16_777_219.;
|
|
|
|
| ^^^^^^^^^^^ help: consider changing the type or replacing it with: `16_777_220.0`
|
|
|
|
|
|
|
|
error: literal cannot be represented as the underlying type without loss of precision
|
2023-06-14 07:12:25 -05:00
|
|
|
--> $DIR/lossy_float_literal.rs:10:18
|
2020-02-20 20:32:06 -06:00
|
|
|
|
|
|
|
|
LL | let _: f32 = 16_777_219.000;
|
|
|
|
| ^^^^^^^^^^^^^^ help: consider changing the type or replacing it with: `16_777_220.0`
|
|
|
|
|
|
|
|
error: literal cannot be represented as the underlying type without loss of precision
|
2023-06-14 07:12:25 -05:00
|
|
|
--> $DIR/lossy_float_literal.rs:11:13
|
2020-02-20 20:32:06 -06:00
|
|
|
|
|
|
|
|
LL | let _ = 16_777_219f32;
|
|
|
|
| ^^^^^^^^^^^^^ help: consider changing the type or replacing it with: `16_777_220_f32`
|
|
|
|
|
|
|
|
error: literal cannot be represented as the underlying type without loss of precision
|
2023-06-14 07:12:25 -05:00
|
|
|
--> $DIR/lossy_float_literal.rs:12:19
|
2020-02-20 20:32:06 -06:00
|
|
|
|
|
|
|
|
LL | let _: f32 = -16_777_219.0;
|
|
|
|
| ^^^^^^^^^^^^ help: consider changing the type or replacing it with: `16_777_220.0`
|
|
|
|
|
|
|
|
error: literal cannot be represented as the underlying type without loss of precision
|
2023-06-14 07:12:25 -05:00
|
|
|
--> $DIR/lossy_float_literal.rs:13:18
|
2020-02-20 20:32:06 -06:00
|
|
|
|
|
|
|
|
LL | let _: f64 = 9_007_199_254_740_993.0;
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the type or replacing it with: `9_007_199_254_740_992.0`
|
|
|
|
|
|
|
|
error: literal cannot be represented as the underlying type without loss of precision
|
2023-06-14 07:12:25 -05:00
|
|
|
--> $DIR/lossy_float_literal.rs:14:18
|
2020-02-20 20:32:06 -06:00
|
|
|
|
|
|
|
|
LL | let _: f64 = 9_007_199_254_740_993.;
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the type or replacing it with: `9_007_199_254_740_992.0`
|
|
|
|
|
|
|
|
error: literal cannot be represented as the underlying type without loss of precision
|
2023-06-14 07:12:25 -05:00
|
|
|
--> $DIR/lossy_float_literal.rs:15:18
|
2020-02-20 20:32:06 -06:00
|
|
|
|
|
|
|
|
LL | let _: f64 = 9_007_199_254_740_993.00;
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the type or replacing it with: `9_007_199_254_740_992.0`
|
|
|
|
|
|
|
|
error: literal cannot be represented as the underlying type without loss of precision
|
2023-06-14 07:12:25 -05:00
|
|
|
--> $DIR/lossy_float_literal.rs:16:13
|
2020-02-20 20:32:06 -06:00
|
|
|
|
|
|
|
|
LL | let _ = 9_007_199_254_740_993f64;
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the type or replacing it with: `9_007_199_254_740_992_f64`
|
|
|
|
|
|
|
|
error: literal cannot be represented as the underlying type without loss of precision
|
2023-06-14 07:12:25 -05:00
|
|
|
--> $DIR/lossy_float_literal.rs:17:19
|
2020-02-20 20:32:06 -06:00
|
|
|
|
|
|
|
|
LL | let _: f64 = -9_007_199_254_740_993.0;
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the type or replacing it with: `9_007_199_254_740_992.0`
|
|
|
|
|
|
|
|
error: aborting due to 11 previous errors
|
|
|
|
|