short diagnostic for E0432 incorrectly describes the problem #133137
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
D-confusing
Diagnostics: Confusing error or lint that should be reworked.
D-incorrect
Diagnostics: A diagnostic that is giving misleading or incorrect information.
D-terse
Diagnostics: An error or lint that doesn't give enough information about the problem at hand.
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
playground: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=a60453f1bdbe2f05f3e1d05560f189f5
If we want people to actually learn the language's finer points, we need to be careful to not casually hack apart the mental model by misusing our own terminology. There is clearly a declaration right there, so saying it is undeclared is misleading at best, actively harmful to understanding at worst: https://doc.rust-lang.org/reference/items/use-declarations.html
Further, a resolution error failing to turn up a module is solved in a very different way, from a user perspective, from a crate not being resolved.
Other cases
Rust Version
Anything else?
No response
The text was updated successfully, but these errors were encountered: