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
Hmm...I was not aware that for _ in range(0i,7i) {} returns types (). The error makes sense once that is known so I'll close this. The only easy action against this seems to be expanded documentation about expressions.
mdinger
changed the title
Unhelpful compiler error message
Returning a for loop gives confusing error message if you aren't aware that can be done
Nov 4, 2014
lnicola
added a commit
to lnicola/rust
that referenced
this issue
Dec 11, 2024
Here the compiler complains about the
for
loop but the problem is that no value is being returned to the function call. This error is confusing.Returns:
The text was updated successfully, but these errors were encountered: