User-created 'core' crate confusingly shadows std 'core' crate #90960
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-resolve
Area: Name resolution
D-confusing
Diagnostics: Confusing error or lint that should be reworked.
D-newcomer-roadblock
Diagnostics: Confusing error or lint; hard to understand for new users.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
This user reported a confusing error about
core
namespace not implementing an expected trait: https://twitter.com/Luminoth82/status/1459602117803450368The root issue turned out to be that they had defined their own
core
crate which was shadowing the standardcore
crate. But the confusing error seems like it could be improved.Ideally the output should look like:
Or some other additional note clarifying exactly which
core
is being built, or mentioning that there are shadowedcore
crates in scope, etc.The text was updated successfully, but these errors were encountered: