From 518568ae0a1a88d3861a78609534ee05d4c86ffb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Linus=20F=C3=A4rnstrand?= Date: Tue, 7 Apr 2020 23:44:24 +0200 Subject: [PATCH] Don't import primitive type modules --- clippy_lints/src/float_literal.rs | 2 +- clippy_lints/src/types.rs | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/clippy_lints/src/float_literal.rs b/clippy_lints/src/float_literal.rs index 79040ebf86d..3a52b1d3fc2 100644 --- a/clippy_lints/src/float_literal.rs +++ b/clippy_lints/src/float_literal.rs @@ -6,7 +6,7 @@ use rustc_hir as hir; use rustc_lint::{LateContext, LateLintPass}; use rustc_middle::ty; use rustc_session::{declare_lint_pass, declare_tool_lint}; -use std::{f32, f64, fmt}; +use std::fmt; declare_clippy_lint! { /// **What it does:** Checks for float literals with a precision greater diff --git a/clippy_lints/src/types.rs b/clippy_lints/src/types.rs index 271459bd1e9..3c8affb367c 100644 --- a/clippy_lints/src/types.rs +++ b/clippy_lints/src/types.rs @@ -1973,8 +1973,6 @@ impl Ord for FullInt { } fn numeric_cast_precast_bounds<'a>(cx: &LateContext<'_, '_>, expr: &'a Expr<'_>) -> Option<(FullInt, FullInt)> { - use std::{i128, i16, i32, i64, i8, isize, u128, u16, u32, u64, u8, usize}; - if let ExprKind::Cast(ref cast_exp, _) = expr.kind { let pre_cast_ty = cx.tables.expr_ty(cast_exp); let cast_ty = cx.tables.expr_ty(expr);