about summary refs log tree commit diff
path: root/src/tools/rust-analyzer/crates/ide-db
diff options
context:
space:
mode:
authorsurechen <chenshuo17@huawei.com>2023-11-10 10:11:24 +0800
committersurechen <chenshuo17@huawei.com>2024-02-18 16:38:11 +0800
commita61126cef6c4083d57e22835033eb2eefdd31bac (patch)
tree8816d1d780e97b77f943c48de09ee330fee3ac9d /src/tools/rust-analyzer/crates/ide-db
parentd3df8ff85121146f2ac5e863e0c9eaba4bf35d32 (diff)
downloadrust-a61126cef6c4083d57e22835033eb2eefdd31bac.tar.gz
rust-a61126cef6c4083d57e22835033eb2eefdd31bac.zip
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
```
Diffstat (limited to 'src/tools/rust-analyzer/crates/ide-db')
-rw-r--r--src/tools/rust-analyzer/crates/ide-db/src/symbol_index.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/rust-analyzer/crates/ide-db/src/symbol_index.rs b/src/tools/rust-analyzer/crates/ide-db/src/symbol_index.rs
index 92c09089e1f..722161282fe 100644
--- a/src/tools/rust-analyzer/crates/ide-db/src/symbol_index.rs
+++ b/src/tools/rust-analyzer/crates/ide-db/src/symbol_index.rs
@@ -31,7 +31,7 @@ use base_db::{
     salsa::{self, ParallelDatabase},
     SourceDatabaseExt, SourceRootId, Upcast,
 };
-use fst::{self, raw::IndexedValue, Automaton, Streamer};
+use fst::{raw::IndexedValue, Automaton, Streamer};
 use hir::{
     db::HirDatabase,
     import_map::{AssocSearchMode, SearchMode},