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:
surechen 2023-11-10 10:11:24 +08:00
parent 1ac4d934a8
commit d88ad9e6b7

View File

@ -28,7 +28,6 @@
use std::ops::Deref;
use std::path::Path;
use std::process::exit;
use std::string::ToString;
use anstream::println;