blob: ba90df2059af65045812387160c026e95ef765e1 [file] [log] [blame]
error: casting function pointer `u16::max` to `usize`
--> tests/ui/confusing_method_to_numeric_cast.rs:5:13
|
LL | let _ = u16::max as usize;
| ^^^^^^^^^^^^^^^^^
|
= note: `-D clippy::confusing-method-to-numeric-cast` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::confusing_method_to_numeric_cast)]`
help: did you mean to use the associated constant?
|
LL - let _ = u16::max as usize;
LL + let _ = u16::MAX as usize;
|
error: casting function pointer `u16::min` to `usize`
--> tests/ui/confusing_method_to_numeric_cast.rs:6:13
|
LL | let _ = u16::min as usize;
| ^^^^^^^^^^^^^^^^^
|
help: did you mean to use the associated constant?
|
LL - let _ = u16::min as usize;
LL + let _ = u16::MIN as usize;
|
error: casting function pointer `u16::max_value` to `usize`
--> tests/ui/confusing_method_to_numeric_cast.rs:7:13
|
LL | let _ = u16::max_value as usize;
| ^^^^^^^^^^^^^^^^^^^^^^^
|
help: did you mean to use the associated constant?
|
LL - let _ = u16::max_value as usize;
LL + let _ = u16::MAX as usize;
|
error: casting function pointer `u16::min_value` to `usize`
--> tests/ui/confusing_method_to_numeric_cast.rs:8:13
|
LL | let _ = u16::min_value as usize;
| ^^^^^^^^^^^^^^^^^^^^^^^
|
help: did you mean to use the associated constant?
|
LL - let _ = u16::min_value as usize;
LL + let _ = u16::MIN as usize;
|
error: casting function pointer `f32::maximum` to `usize`
--> tests/ui/confusing_method_to_numeric_cast.rs:10:13
|
LL | let _ = f32::maximum as usize;
| ^^^^^^^^^^^^^^^^^^^^^
|
help: did you mean to use the associated constant?
|
LL - let _ = f32::maximum as usize;
LL + let _ = f32::MAX as usize;
|
error: casting function pointer `f32::max` to `usize`
--> tests/ui/confusing_method_to_numeric_cast.rs:11:13
|
LL | let _ = f32::max as usize;
| ^^^^^^^^^^^^^^^^^
|
help: did you mean to use the associated constant?
|
LL - let _ = f32::max as usize;
LL + let _ = f32::MAX as usize;
|
error: casting function pointer `f32::minimum` to `usize`
--> tests/ui/confusing_method_to_numeric_cast.rs:12:13
|
LL | let _ = f32::minimum as usize;
| ^^^^^^^^^^^^^^^^^^^^^
|
help: did you mean to use the associated constant?
|
LL - let _ = f32::minimum as usize;
LL + let _ = f32::MIN as usize;
|
error: casting function pointer `f32::min` to `usize`
--> tests/ui/confusing_method_to_numeric_cast.rs:13:13
|
LL | let _ = f32::min as usize;
| ^^^^^^^^^^^^^^^^^
|
help: did you mean to use the associated constant?
|
LL - let _ = f32::min as usize;
LL + let _ = f32::MIN as usize;
|
error: aborting due to 8 previous errors