]> git.lizzy.rs Git - rust.git/blobdiff - clippy_lints/src/casts/unnecessary_cast.rs
[`unnecessary_cast`] Do not lint negative hexadecimal literals when cast as float
[rust.git] / clippy_lints / src / casts / unnecessary_cast.rs
index 21ed7f4844cc593948bbb21bc6a69c1c37ca126c..c8596987e4d719b158aa879d7f1bc2bf452d4c16 100644 (file)
@@ -59,9 +59,6 @@ pub(super) fn check<'tcx>(
                 lint_unnecessary_cast(cx, expr, literal_str, cast_from, cast_to);
                 return false;
             },
-            LitKind::Int(_, LitIntType::Unsuffixed) | LitKind::Float(_, LitFloatType::Unsuffixed) => {
-                return false;
-            },
             LitKind::Int(_, LitIntType::Signed(_) | LitIntType::Unsigned(_))
             | LitKind::Float(_, LitFloatType::Suffixed(_))
                 if cast_from.kind() == cast_to.kind() =>