-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Improved messaging for ?
within a function with ()
return type - E0277
#101281
Comments
I'm not sure if that Regarding "not knowing which function needs the return type", it's already being pointed out in the error message? Do you have a better example for where this is particularly confusing? |
I think the pointed out part is using those ascii characters (| and /). I feel that having at least the function name that the error is talking about would be beneficial. If you think the hint I suggested does not add more value, thats fine. |
…ing-scope, r=oli-obk Use head span for `rustc_on_unimplemented`'s `enclosing_scope` attr This may make rust-lang#101281 slightly easier to understand
This error now looks like:
Is that better? |
Thank you! I think this is better. Are you ok with this change? |
I'm gonna close this issue as completed then, please re-open an issue if you continue to find this error message confusing! |
This is mostly a suggestion if there can be some improvement to the diagnostics.
Given the following code: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=0aa16f03b3a56a8133bf2023fd8a0c4e
The current output is:
Ideally the output should look like:
This error is easier to miss because busy-ness and not knowing which function needs the return type.
The text was updated successfully, but these errors were encountered: