From d88ad9e6b7b07d177c28bf7c65c3bf44759338b4 Mon Sep 17 00:00:00 2001 From: surechen Date: Fri, 10 Nov 2023 10:11:24 +0800 Subject: [PATCH] By tracking import use types to check whether it is scope uses or the other situations like module-relative uses, we can do more accurate redundant import checking. fixes #117448 For example unnecessary imports in std::prelude that can be eliminated: ```rust use std::option::Option::Some;//~ WARNING the item `Some` is imported redundantly use std::option::Option::None; //~ WARNING the item `None` is imported redundantly ``` --- src/driver.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/driver.rs b/src/driver.rs index bdf1cf0a224..85867d1511d 100644 --- a/src/driver.rs +++ b/src/driver.rs @@ -28,7 +28,6 @@ use std::ops::Deref; use std::path::Path; use std::process::exit; -use std::string::ToString; use anstream::println;