-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Compiler error message is confusing #64829
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
This comment has been minimized.
This comment has been minimized.
@csmoe thank you for your reply. I mean the error message is useless. It says the types mismatched, but there is no context in the error message, so how can I fix it. I know how to fix but I don't know where to fix. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Unfortunately, this is report is not actionable without knowing more about the situation, which we will need to know about to fashion a more tailored error message. |
@Centril That's not the problem, the problem is there's no span at all. @divinerapier Are you using any custom derives? That's the only thing I can think of that could be able to cause this. If you can provide a list of your ( If you want to try to reduce your code, you can start by taking various functions and replacing their bodies with |
This is a problem that needs to be solved. I'm pretty sure it's a duplicate of #51635. |
@eddyb When I reduce the code, I find when |
Triage: this really needs some way to reproduce. |
@steveklabnik there have been multiple changes that @Aaron1011 has made to the macro machinery to preserve their token streams to avoid the most egregious of these errors, but they will still happen when proc_macros rewrite the output TTS. I don't recall what the tracking issue for that work is. Edit: #51635 (comment):
|
@Aaron1011 given issue #43081 is resolved can this be considered resolved? I've a confusing compiler error use case to report, and am looking for open issues that might cover my case. It doesn't look like this is my issue, but this issue appears to be resolved by issue #43081 |
@bbros-dev: That's correct - we now preserve spans in all stable code, and in almost all unstable code. Feel free to open a new issue for the compiler error that you're getting. |
I don't know what caused this error. Sorry, I can't provide simple code to reproduce it.
Thanks.
The text was updated successfully, but these errors were encountered: