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
We should do better on the diagnostic in this case, since presumably the author of the code meant to return the 10, so we should suggest that the function needs a return type, somewhat as we currently give the "remove ;" suggestion.
fnfoo(){10}
error[E0308]: mismatched types
--> test.rs:2:5
|
2 | 10
| ^^ expected (), found integral variable
|
= note: expected type `()`
found type `{integer}`
error: aborting due to previous error