Rustc suggests importing trait inside private module #90258
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
The current output is:
Here, rustc suggests importing the trait
RingSlices
, which is inside a private module and can't be used.If possible, rustc should probably check whether a suggested trait is usable in the current module, and only suggest it if it is.
One thing that is useful about the current version is, that it might suggest that the user should make the module public if they control it. Maybe it should still be emitted if the trait is in the current crate.
Found by @angelsflyinhell, a rust beginner that was a bit confused by this
The text was updated successfully, but these errors were encountered: