Skip to content

The return behavior of Block expressions in manual is unclear description #14849

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

Closed
tetsuharuohzeki opened this issue Jun 12, 2014 · 0 comments · Fixed by #22307
Closed

The return behavior of Block expressions in manual is unclear description #14849

tetsuharuohzeki opened this issue Jun 12, 2014 · 0 comments · Fixed by #22307

Comments

@tetsuharuohzeki
Copy link
Contributor

The descriptions of Block expressions in the reference manual describes about its returning behavior:

If the final expression is omitted, the type and return value of the block are (), but if it is provided, the type and return value of the block are that of the expression itself.

I think this description has some unclear points,

  • Is this "return" means same as return expressions, or simply means "returning value"?
  • If this behave like return expressions, whether will value moved or copied?
    • if this behavior is under the terminology for rvalue, I seem we should describe it explicitly.

So how should we make this part more clearly description?

steveklabnik added a commit to steveklabnik/rust that referenced this issue Feb 13, 2015
steveklabnik added a commit to steveklabnik/rust that referenced this issue Feb 14, 2015
steveklabnik added a commit to steveklabnik/rust that referenced this issue Feb 15, 2015
Manishearth added a commit to Manishearth/rust that referenced this issue Feb 15, 2015
bors added a commit to rust-lang-ci/rust that referenced this issue Jun 5, 2023
enhancement : using doc aliases to search workspace symbols  ( fixes rust-lang#14557 )

Doc aliases are now visible among symbols and can be used for searching.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants