3 #![allow(clippy::no_effect, clippy::unnecessary_operation, dead_code)]
4 #![warn(clippy::cast_lossless)]
7 // Test clippy::cast_lossless with casts to floating-point types
25 // Test with casts from floating-point types
29 // The lint would suggest using `f64::from(input)` here but the `XX::from` function is not const,
30 // so we skip the lint if the expression is in a const fn.
32 const fn abc(input: f32) -> f64 {
36 // Same as the above issue. We can't suggest `::from` in const fns in impls
37 mod cast_lossless_in_impl {
41 pub const fn convert(x: f32) -> f64 {