mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 23:25:03 +00:00
Auto merge of #117772 - surechen:for_117448, r=petrochenkov
Tracking import use types for more accurate redundant import checking fixes #117448 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. 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:
commit
1c10aa4735
19 changed files with 20 additions and 34 deletions
|
@ -1,5 +1,4 @@
|
|||
//!
|
||||
use std::{convert::TryFrom, iter::FromIterator};
|
||||
|
||||
use crate::parenthesized::Parenthesized;
|
||||
use heck::ToUpperCamelCase;
|
||||
|
|
|
@ -5,7 +5,6 @@ use crate::durability::Durability;
|
|||
use crate::plumbing::QueryStorageOps;
|
||||
use crate::Query;
|
||||
use crate::QueryTable;
|
||||
use std::iter::FromIterator;
|
||||
|
||||
/// Additional methods on queries that can be used to "peek into"
|
||||
/// their current state. These methods are meant for debugging and
|
||||
|
|
|
@ -13,7 +13,6 @@ use crate::Runtime;
|
|||
use crate::{Database, DatabaseKeyIndex, QueryDb, Revision};
|
||||
use parking_lot::RwLock;
|
||||
use std::borrow::Borrow;
|
||||
use std::convert::TryFrom;
|
||||
use std::hash::Hash;
|
||||
use std::marker::PhantomData;
|
||||
use triomphe::Arc;
|
||||
|
|
|
@ -14,7 +14,6 @@ use crate::Runtime;
|
|||
use crate::{DatabaseKeyIndex, QueryDb};
|
||||
use indexmap::map::Entry;
|
||||
use parking_lot::RwLock;
|
||||
use std::convert::TryFrom;
|
||||
use std::iter;
|
||||
use tracing::debug;
|
||||
|
||||
|
|
|
@ -13,7 +13,6 @@ use crate::{Database, DatabaseKeyIndex, QueryDb};
|
|||
use parking_lot::RwLock;
|
||||
use rustc_hash::FxHashMap;
|
||||
use std::collections::hash_map::Entry;
|
||||
use std::convert::From;
|
||||
use std::fmt::Debug;
|
||||
use std::hash::Hash;
|
||||
use triomphe::Arc;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue