Importing from the wrong module leads to privacy error, which is unhelpful #57619
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-resolve
Area: Name resolution
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
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.
this kind of thing happens pretty often for me, where I try importing from the wrong module.
This gives me the following error:
this is misleading because most Rust mental models don't consider
use
statements to be private instances, they just work that way.Ideally, this error would notice that it's a private use statement, and instead backtrack it to find the actual path that should be used.
The text was updated successfully, but these errors were encountered: