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 ```
This commit is contained in:
parent
d3df8ff851
commit
a61126cef6
52 changed files with 283 additions and 167 deletions
|
@ -15,7 +15,7 @@ use crate::ty::{Region, UserTypeAnnotationIndex};
|
|||
use rustc_ast::{InlineAsmOptions, InlineAsmTemplatePiece};
|
||||
use rustc_data_structures::packed::Pu128;
|
||||
use rustc_hir::def_id::DefId;
|
||||
use rustc_hir::{self, CoroutineKind};
|
||||
use rustc_hir::CoroutineKind;
|
||||
use rustc_index::IndexVec;
|
||||
use rustc_span::source_map::Spanned;
|
||||
use rustc_target::abi::{FieldIdx, VariantIdx};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue