rustc incorrectly suggests removing imports that shadow shadowing glob imports #92904
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-resolve
Area: Name/path resolution done by `rustc_resolve` specifically
D-incorrect
Diagnostics: A diagnostic that is giving misleading or incorrect information.
D-papercut
Diagnostics: An error or lint that needs small tweaks.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Given the following code: https://godbolt.org/z/vdc4YYafK
The current output is:
The warning for redundant import is incorrect, and is required for code to compile:
bar::*
shadows the implicitself::Foo
in this scope, so making it explicit shadows the implicitbar::*
. This should either be an error or not a warning; the latter is probably correct.The non-glob version is handled correctly: https://godbolt.org/z/653K6svve
The text was updated successfully, but these errors were encountered: