2020-02-20 20:32:06 -06:00
|
|
|
error: literal cannot be represented as the underlying type without loss of precision
|
2024-06-18 12:34:49 -05:00
|
|
|
--> tests/ui/lossy_float_literal.rs:14:18
|
2020-02-20 20:32:06 -06:00
|
|
|
|
|
|
|
|
LL | let _: f32 = 16_777_217.0;
|
2024-08-08 12:13:50 -05:00
|
|
|
| ^^^^^^^^^^^^
|
2020-02-20 20:32:06 -06:00
|
|
|
|
|
|
|
|
= note: `-D clippy::lossy-float-literal` implied by `-D warnings`
|
2023-08-01 07:02:21 -05:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::lossy_float_literal)]`
|
2024-08-08 12:13:50 -05:00
|
|
|
help: consider changing the type or replacing it with
|
|
|
|
|
|
|
|
|
LL | let _: f32 = 16_777_216.0;
|
|
|
|
| ~~~~~~~~~~~~
|
2020-02-20 20:32:06 -06:00
|
|
|
|
|
|
|
error: literal cannot be represented as the underlying type without loss of precision
|
2024-06-18 12:34:49 -05:00
|
|
|
--> tests/ui/lossy_float_literal.rs:15:18
|
2020-02-20 20:32:06 -06:00
|
|
|
|
|
|
|
|
LL | let _: f32 = 16_777_219.0;
|
2024-08-08 12:13:50 -05:00
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: consider changing the type or replacing it with
|
|
|
|
|
|
|
|
|
LL | let _: f32 = 16_777_220.0;
|
|
|
|
| ~~~~~~~~~~~~
|
2020-02-20 20:32:06 -06:00
|
|
|
|
|
|
|
error: literal cannot be represented as the underlying type without loss of precision
|
2024-06-18 12:34:49 -05:00
|
|
|
--> tests/ui/lossy_float_literal.rs:16:18
|
2020-02-20 20:32:06 -06:00
|
|
|
|
|
|
|
|
LL | let _: f32 = 16_777_219.;
|
2024-08-08 12:13:50 -05:00
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: consider changing the type or replacing it with
|
|
|
|
|
|
|
|
|
LL | let _: f32 = 16_777_220.0;
|
|
|
|
| ~~~~~~~~~~~~
|
2020-02-20 20:32:06 -06:00
|
|
|
|
|
|
|
error: literal cannot be represented as the underlying type without loss of precision
|
2024-06-18 12:34:49 -05:00
|
|
|
--> tests/ui/lossy_float_literal.rs:17:18
|
2020-02-20 20:32:06 -06:00
|
|
|
|
|
|
|
|
LL | let _: f32 = 16_777_219.000;
|
2024-08-08 12:13:50 -05:00
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: consider changing the type or replacing it with
|
|
|
|
|
|
|
|
|
LL | let _: f32 = 16_777_220.0;
|
|
|
|
| ~~~~~~~~~~~~
|
2020-02-20 20:32:06 -06:00
|
|
|
|
|
|
|
error: literal cannot be represented as the underlying type without loss of precision
|
2024-06-18 12:34:49 -05:00
|
|
|
--> tests/ui/lossy_float_literal.rs:18:13
|
2020-02-20 20:32:06 -06:00
|
|
|
|
|
|
|
|
LL | let _ = 16_777_219f32;
|
2024-08-08 12:13:50 -05:00
|
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: consider changing the type or replacing it with
|
|
|
|
|
|
|
|
|
LL | let _ = 16_777_220_f32;
|
|
|
|
| ~~~~~~~~~~~~~~
|
2020-02-20 20:32:06 -06:00
|
|
|
|
|
|
|
error: literal cannot be represented as the underlying type without loss of precision
|
2024-06-18 12:34:49 -05:00
|
|
|
--> tests/ui/lossy_float_literal.rs:19:19
|
2020-02-20 20:32:06 -06:00
|
|
|
|
|
|
|
|
LL | let _: f32 = -16_777_219.0;
|
2024-08-08 12:13:50 -05:00
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: consider changing the type or replacing it with
|
|
|
|
|
|
|
|
|
LL | let _: f32 = -16_777_220.0;
|
|
|
|
| ~~~~~~~~~~~~
|
2020-02-20 20:32:06 -06:00
|
|
|
|
|
|
|
error: literal cannot be represented as the underlying type without loss of precision
|
2024-06-18 12:34:49 -05:00
|
|
|
--> tests/ui/lossy_float_literal.rs:21:18
|
2020-02-20 20:32:06 -06:00
|
|
|
|
|
|
|
|
LL | let _: f64 = 9_007_199_254_740_993.0;
|
2024-08-08 12:13:50 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: consider changing the type or replacing it with
|
|
|
|
|
|
|
|
|
LL | let _: f64 = 9_007_199_254_740_992.0;
|
|
|
|
| ~~~~~~~~~~~~~~~~~~~~~~~
|
2020-02-20 20:32:06 -06:00
|
|
|
|
|
|
|
error: literal cannot be represented as the underlying type without loss of precision
|
2024-06-18 12:34:49 -05:00
|
|
|
--> tests/ui/lossy_float_literal.rs:22:18
|
2020-02-20 20:32:06 -06:00
|
|
|
|
|
|
|
|
LL | let _: f64 = 9_007_199_254_740_993.;
|
2024-08-08 12:13:50 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: consider changing the type or replacing it with
|
|
|
|
|
|
|
|
|
LL | let _: f64 = 9_007_199_254_740_992.0;
|
|
|
|
| ~~~~~~~~~~~~~~~~~~~~~~~
|
2020-02-20 20:32:06 -06:00
|
|
|
|
|
|
|
error: literal cannot be represented as the underlying type without loss of precision
|
2024-06-18 12:34:49 -05:00
|
|
|
--> tests/ui/lossy_float_literal.rs:23:18
|
2020-02-20 20:32:06 -06:00
|
|
|
|
|
|
|
|
LL | let _: f64 = 9_007_199_254_740_993.00;
|
2024-08-08 12:13:50 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: consider changing the type or replacing it with
|
|
|
|
|
|
|
|
|
LL | let _: f64 = 9_007_199_254_740_992.0;
|
|
|
|
| ~~~~~~~~~~~~~~~~~~~~~~~
|
2020-02-20 20:32:06 -06:00
|
|
|
|
|
|
|
error: literal cannot be represented as the underlying type without loss of precision
|
2024-06-18 12:34:49 -05:00
|
|
|
--> tests/ui/lossy_float_literal.rs:24:13
|
2020-02-20 20:32:06 -06:00
|
|
|
|
|
|
|
|
LL | let _ = 9_007_199_254_740_993f64;
|
2024-08-08 12:13:50 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: consider changing the type or replacing it with
|
|
|
|
|
|
|
|
|
LL | let _ = 9_007_199_254_740_992_f64;
|
|
|
|
| ~~~~~~~~~~~~~~~~~~~~~~~~~
|
2020-02-20 20:32:06 -06:00
|
|
|
|
|
|
|
error: literal cannot be represented as the underlying type without loss of precision
|
2024-06-18 12:34:49 -05:00
|
|
|
--> tests/ui/lossy_float_literal.rs:25:19
|
2020-02-20 20:32:06 -06:00
|
|
|
|
|
|
|
|
LL | let _: f64 = -9_007_199_254_740_993.0;
|
2024-08-08 12:13:50 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: consider changing the type or replacing it with
|
|
|
|
|
|
|
|
|
LL | let _: f64 = -9_007_199_254_740_992.0;
|
|
|
|
| ~~~~~~~~~~~~~~~~~~~~~~~
|
2020-02-20 20:32:06 -06:00
|
|
|
|
|
|
|
error: aborting due to 11 previous errors
|
|
|
|
|