mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-11-14 09:46:00 +00:00
handle {self} when removing unused imports
Fixes #17139
On master
```rs
mod inner {
pub struct X();
pub struct Y();
}
mod z {
use super::inner::{self, X}$0;
fn f() {
let y = inner::Y();
}
}
```
becomes
```rs
mod inner {
pub struct X();
pub struct Y();
}
mod z {
use super::inner:self;
fn f() {
let y = inner::Y();
}
}
```
with this fix it instead becomes
```
```rs
mod inner {
pub struct X();
pub struct Y();
}
mod z {
use super::inner;
fn f() {
let y = inner::Y();
}
}
```
|
||
|---|---|---|
| .. | ||
| fuzz | ||
| src | ||
| test_data | ||
| Cargo.toml | ||
| rust.ungram | ||