-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Confusing diagnostic when improperly using constant as type. #81508
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
Comments
Every single one of these errors should point at similarly named things of the wrong namespace. |
Do you know where in the code this is coming from? |
@henryboisdequin running the following will tell you where the error is being emitted:
From there the place you might want to start looking at is |
@rustbot claim |
Can I take this issue? |
Yes feel free to take it, I removed my assignment. |
I’m going to be tied up until May, feel free to take this issue:pray: |
Hey I'm looking to get to know the Rust codebase better and contribute to the project - would love to take a crack at this issue! |
@rustbot claim |
The following code...
...yields the following error and warning:
The warning says that
Foo
is not used but it clearly is, just not properly. This error is normally easier to spot when using the proper casing for constants, but that might not always be the case. Perhaps in this instance, we should look for other items with the exact same name and point out that the user is trying to use a constant as a type.The text was updated successfully, but these errors were encountered: