mirror of
https://github.com/rust-lang/rust.git
synced 2025-11-17 18:36:09 +00:00
Improve spans with `use crate::{self}`
Fixes #104276.
The error becomes:
```
error: crate root imports need to be explicitly named: `use crate as name;`
--> src/lib.rs.rs:1:13
|
1 | use crate::{self};
| ^^^^
warning: unused import: `self`
--> src/lib.rs:1:13
|
1 | use crate::{self};
| ^^^^
|
= note: `#[warn(unused_imports)]` on by default
```