-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
error: return
in block function
#6965
Comments
This is by design and we agreed it's not going to be changed. Sorry! (In this case, you can write |
Further details: this has to do with preserving Tennent's correspondence principle (or at least prohibiting expressions for which we can't preserve it). See http://gafter.blogspot.ca/2006/08/tennents-correspondence-principle-and.html for some further rationale. |
@graydon Thanks for the link. I had not heard of Tennent's correspondence principle before. |
…alid_sugg_macro_expansion, r=llogiq manual_unwrap_or: fix invalid code suggestion, due to macro expansion fixes rust-lang#6965 changelog: fix invalid code suggestion in `manual_unwrap_or` lint, due to macro expansion
Current rust incoming doesn't allow me to use
return
inside a lambda.produces (output taken from the IRC rusti bot):
The text was updated successfully, but these errors were encountered: