2023-06-20 21:34:24 +00:00
|
|
|
error: usage of a legacy numeric constant
|
2024-03-24 16:16:45 +00:00
|
|
|
--> tests/ui/legacy_numeric_constants.rs:31:5
|
2023-06-20 21:34:24 +00:00
|
|
|
|
|
|
|
|
LL | std::f32::EPSILON;
|
|
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: `-D clippy::legacy-numeric-constants` implied by `-D warnings`
|
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::legacy_numeric_constants)]`
|
|
|
|
help: use the associated constant instead
|
|
|
|
|
|
|
|
|
LL | f32::EPSILON;
|
|
|
|
| ~~~~~~~~~~~~
|
|
|
|
|
|
|
|
error: usage of a legacy numeric constant
|
2024-03-24 16:16:45 +00:00
|
|
|
--> tests/ui/legacy_numeric_constants.rs:34:5
|
2023-06-20 21:34:24 +00:00
|
|
|
|
|
|
|
|
LL | std::u8::MIN;
|
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: use the associated constant instead
|
|
|
|
|
|
|
|
|
LL | u8::MIN;
|
|
|
|
| ~~~~~~~
|
|
|
|
|
|
|
|
error: usage of a legacy numeric constant
|
2024-03-24 16:16:45 +00:00
|
|
|
--> tests/ui/legacy_numeric_constants.rs:37:5
|
2023-06-20 21:34:24 +00:00
|
|
|
|
|
|
|
|
LL | std::usize::MIN;
|
|
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: use the associated constant instead
|
|
|
|
|
|
|
|
|
LL | usize::MIN;
|
|
|
|
| ~~~~~~~~~~
|
|
|
|
|
|
|
|
error: usage of a legacy numeric constant
|
2024-03-24 16:16:45 +00:00
|
|
|
--> tests/ui/legacy_numeric_constants.rs:40:5
|
2023-06-20 21:34:24 +00:00
|
|
|
|
|
|
|
|
LL | std::u32::MAX;
|
|
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: use the associated constant instead
|
|
|
|
|
|
|
|
|
LL | u32::MAX;
|
|
|
|
| ~~~~~~~~
|
|
|
|
|
|
|
|
error: usage of a legacy numeric constant
|
2024-03-24 16:16:45 +00:00
|
|
|
--> tests/ui/legacy_numeric_constants.rs:43:5
|
2023-06-20 21:34:24 +00:00
|
|
|
|
|
|
|
|
LL | core::u32::MAX;
|
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: use the associated constant instead
|
|
|
|
|
|
|
|
|
LL | u32::MAX;
|
|
|
|
| ~~~~~~~~
|
|
|
|
|
|
|
|
error: usage of a legacy numeric constant
|
2024-03-24 16:16:45 +00:00
|
|
|
--> tests/ui/legacy_numeric_constants.rs:46:5
|
2023-06-20 21:34:24 +00:00
|
|
|
|
|
|
|
|
LL | MAX;
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
|
help: use the associated constant instead
|
|
|
|
|
|
|
|
|
LL | u32::MAX;
|
|
|
|
| ~~~~~~~~
|
|
|
|
|
|
|
|
error: usage of a legacy numeric method
|
2024-03-24 16:16:45 +00:00
|
|
|
--> tests/ui/legacy_numeric_constants.rs:49:10
|
2023-06-20 21:34:24 +00:00
|
|
|
|
|
|
|
|
LL | i32::max_value();
|
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: use the associated constant instead
|
|
|
|
|
|
|
|
|
LL | i32::MAX;
|
|
|
|
| ~~~
|
|
|
|
|
|
|
|
error: usage of a legacy numeric method
|
2024-03-24 16:16:45 +00:00
|
|
|
--> tests/ui/legacy_numeric_constants.rs:52:9
|
2023-06-20 21:34:24 +00:00
|
|
|
|
|
|
|
|
LL | u8::max_value();
|
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: use the associated constant instead
|
|
|
|
|
|
|
|
|
LL | u8::MAX;
|
|
|
|
| ~~~
|
|
|
|
|
|
|
|
error: usage of a legacy numeric method
|
2024-03-24 16:16:45 +00:00
|
|
|
--> tests/ui/legacy_numeric_constants.rs:55:9
|
2023-06-20 21:34:24 +00:00
|
|
|
|
|
|
|
|
LL | u8::min_value();
|
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: use the associated constant instead
|
|
|
|
|
|
|
|
|
LL | u8::MIN;
|
|
|
|
| ~~~
|
|
|
|
|
|
|
|
error: usage of a legacy numeric constant
|
2024-03-24 16:16:45 +00:00
|
|
|
--> tests/ui/legacy_numeric_constants.rs:58:5
|
2023-06-20 21:34:24 +00:00
|
|
|
|
|
|
|
|
LL | ::std::u8::MIN;
|
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: use the associated constant instead
|
|
|
|
|
|
|
|
|
LL | u8::MIN;
|
|
|
|
| ~~~~~~~
|
|
|
|
|
|
|
|
error: usage of a legacy numeric method
|
2024-03-24 16:16:45 +00:00
|
|
|
--> tests/ui/legacy_numeric_constants.rs:61:27
|
2023-06-20 21:34:24 +00:00
|
|
|
|
|
|
|
|
LL | ::std::primitive::u8::min_value();
|
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: use the associated constant instead
|
|
|
|
|
|
|
|
|
LL | ::std::primitive::u8::MIN;
|
|
|
|
| ~~~
|
|
|
|
|
|
|
|
error: usage of a legacy numeric method
|
2024-03-24 16:16:45 +00:00
|
|
|
--> tests/ui/legacy_numeric_constants.rs:64:26
|
2023-06-20 21:34:24 +00:00
|
|
|
|
|
|
|
|
LL | std::primitive::i32::max_value();
|
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: use the associated constant instead
|
|
|
|
|
|
|
|
|
LL | std::primitive::i32::MAX;
|
|
|
|
| ~~~
|
|
|
|
|
|
|
|
error: usage of a legacy numeric constant
|
2024-03-24 16:16:45 +00:00
|
|
|
--> tests/ui/legacy_numeric_constants.rs:67:5
|
2023-06-20 21:34:24 +00:00
|
|
|
|
|
|
|
|
LL | self::a::u128::MAX;
|
|
|
|
| ^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: use the associated constant instead
|
|
|
|
|
|
|
|
|
LL | u128::MAX;
|
|
|
|
| ~~~~~~~~~
|
|
|
|
|
|
|
|
error: usage of a legacy numeric constant
|
2024-03-24 16:16:45 +00:00
|
|
|
--> tests/ui/legacy_numeric_constants.rs:17:25
|
2023-06-20 21:34:24 +00:00
|
|
|
|
|
|
|
|
LL | let x = std::u64::MAX;
|
|
|
|
| ^^^^^^^^^^^^^
|
|
|
|
...
|
|
|
|
LL | b!();
|
|
|
|
| ---- in this macro invocation
|
|
|
|
|
|
|
|
|
= note: this error originates in the macro `b` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
help: use the associated constant instead
|
|
|
|
|
|
|
|
|
LL | let x = u64::MAX;
|
|
|
|
| ~~~~~~~~
|
|
|
|
|
|
|
|
error: usage of a legacy numeric constant
|
2024-03-24 16:16:45 +00:00
|
|
|
--> tests/ui/legacy_numeric_constants.rs:81:14
|
2023-06-20 21:34:24 +00:00
|
|
|
|
|
|
|
|
LL | [(0, "", std::i128::MAX)];
|
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: use the associated constant instead
|
|
|
|
|
|
|
|
|
LL | [(0, "", i128::MAX)];
|
|
|
|
| ~~~~~~~~~
|
|
|
|
|
|
|
|
error: usage of a legacy numeric constant
|
2024-03-24 16:16:45 +00:00
|
|
|
--> tests/ui/legacy_numeric_constants.rs:115:5
|
2023-06-20 21:34:24 +00:00
|
|
|
|
|
|
|
|
LL | std::u32::MAX;
|
|
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: use the associated constant instead
|
|
|
|
|
|
|
|
|
LL | u32::MAX;
|
|
|
|
| ~~~~~~~~
|
|
|
|
|
|
|
|
error: aborting due to 16 previous errors
|
|
|
|
|