You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I made this typo in some code I was writing just now, a colon in place of a semicolon after a function call, with another function call on the next line:
rustc 1.17.0 (56124baa9 2017-04-24)
error[E0573]: expected type, found function `f`
--> <anon>:5:5
|
5 | f();
| ^^^ not a type
This is technically correct, but it was confusing and it took me a few minutes to realize what I had done. It would be nicer if we could guess in some circumstances that the user probably meant to put a semicolon there and say something to that effect.
The text was updated successfully, but these errors were encountered:
Oh! I looked for other issues but didn't find anything obvious. I'm happy to close this in favor of that. Could you put some of the keywords from my issue title into yours? Perhaps at least the error number, 'colon' and 'semicolon'.
Point at `:` when using it instead of `;`
When triggering type ascription in such a way that we can infer a
statement end was intended, add a suggestion for the change. Always
point out the reason for the expectation of a type is due to type
ascription.
Fix#42057, #41928.
I made this typo in some code I was writing just now, a colon in place of a semicolon after a function call, with another function call on the next line:
Run it on play.
The compiler errors with:
This is technically correct, but it was confusing and it took me a few minutes to realize what I had done. It would be nicer if we could guess in some circumstances that the user probably meant to put a semicolon there and say something to that effect.
The text was updated successfully, but these errors were encountered: