Commit 5c764da
authored
Rollup merge of rust-lang#104315 - SparkyPotato:fix-104276, r=cjgillot
Improve spans with `use crate::{self}`
Fixes rust-lang#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
```File tree
3 files changed
+15
-1
lines changed- compiler/rustc_resolve/src
- src/test/ui/use
3 files changed
+15
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
469 | 469 | | |
470 | 470 | | |
471 | 471 | | |
| 472 | + | |
472 | 473 | | |
473 | 474 | | |
474 | | - | |
| 475 | + | |
| 476 | + | |
475 | 477 | | |
476 | 478 | | |
477 | 479 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
0 commit comments