Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

E0433 should not purely rely on letter case to report different error. #82140

Open
crlf0710 opened this issue Feb 15, 2021 · 3 comments
Open
Labels
A-diagnostics Area: Messages for errors, warnings, and lints A-resolve Area: Name resolution C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@crlf0710
Copy link
Member

I've seen this:

error[E0433]: failed to resolve: use of undeclared crate or module `kern_node_subtype`

However kern_node_subtype is actually an enum type. In this crate i #[allow(non_camel_case_types)]. Since this is an error message not a suggestion i think it would be best if this could be improved somehow.

@crlf0710 crlf0710 added A-diagnostics Area: Messages for errors, warnings, and lints A-resolve Area: Name resolution C-bug Category: This is a bug. labels Feb 15, 2021
@estebank
Copy link
Contributor

We can't know what item type you're trying to access because it couldn't find it, so the diagnostic infers what it might have been from the style of the used name. I don't see how we would be able to improve here.

@fee1-dead
Copy link
Member

The error could include a message which tells users that enum types/structs are not supposed to be snake cased. Would that work @crlf0710?

@crlf0710
Copy link
Member Author

@fee1-dead It would also be great if there's usual suggestions. It seems the casing currently suppress the auto lookup for types that lives in a different module.

@Noratrieb Noratrieb added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Apr 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints A-resolve Area: Name resolution C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants