-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Given the following code:
use crate::{self};
The current output is:
error: crate root imports need to be explicitly named: `use crate as name;`
--> src/lib.rs:1:5
|
1 | use crate::{self};
| ^^^^^
warning: unused import: `self`
--> src/lib.rs:1:13
|
1 | use crate::{self};
| ^^^^
|
= note: `#[warn(unused_imports)]` on by default
Ideally the output should look like:
error: crate root imports need to be explicitly named: `self as name`
--> src/lib.rs:1:5
|
1 | use crate::{self};
| ^^^^
This happens on both stable and the latest nightly.
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.