-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Better diagnostics for :
instead of ->
in return type
#77115
Comments
For reference, the current error is
|
Pushed #78379 to use the regular "expected"/"found" error machinery, which will correctly say |
I used tools with expected/found error machinery like in go and nix, but I still find rust explicit method better, after trying out those tools I get confused most of the time. I think it is only good as a fallback but specific error messages should still be available if possible. |
For the reference, #77035 provides this nice specialized error for
|
@bugaevc for a while now I've been thinking that we should have a general typo checker for arbitrary positions. Such a check would allow us to give suggestions for for example |
In my mind, we could introduce a check in In |
Follow-up to #77019
Originally posted by @bugaevc in #77035 (comment):
Would also be cool to emit this upon encountering
which is how you'd define the return type in Scala and Kotlin.
The text was updated successfully, but these errors were encountered: