Empty super::{} and self::{} imports gives an error. #119776
Labels
A-resolve
Area: Name/path resolution done by `rustc_resolve` specifically
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code
Current output
Desired output
Rationale and extra context
The same problem exists with an empty
use self::{};
import.There is no reason for empty self and super imports gives an error when empty
crate::{}
,some_crate::{}
andpath::to::a::module::{}
imports are perfectly valid. The compiler should of course emit a warning.If they should be forbidden nonetheless, the error message could be clearer.
It should be noted that the following code if perfectly valid:
I obtained such a code with empty
super
imports with macros.Other cases
No response
Rust Version
Anything else?
No response
The text was updated successfully, but these errors were encountered: