3 #![allow(clippy::no_effect, clippy::unnecessary_operation, dead_code)]
4 #![warn(clippy::cast_lossless)]
7 // Test clippy::cast_lossless with casts to integer types
27 // Test with an expression wrapped in parens
31 // The lint would suggest using `f64::from(input)` here but the `XX::from` function is not const,
32 // so we skip the lint if the expression is in a const fn.
34 const fn abc(input: u16) -> u32 {
38 // Same as the above issue. We can't suggest `::from` in const fns in impls
39 mod cast_lossless_in_impl {
43 pub const fn convert(x: u32) -> u64 {