Confusing E0425 error when referencing undefined name with ::foo #63799
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-resolve
Area: Name/path resolution done by `rustc_resolve` specifically
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Test program:
This produces the following error messages:
Both the error and the help seem entirely unhelpful. The error suggests that it looked for a function
foo
in the crate root, but in fact it looked for a cratefoo
. The whole "possible candidate" help seems incorrect, and adding that line would lead to a compilation failure.The text was updated successfully, but these errors were encountered: