Skip to content

Expand block expression section #376

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

Merged
merged 1 commit into from
Aug 20, 2018

Conversation

Havvy
Copy link
Contributor

@Havvy Havvy commented Jul 27, 2018

  1. Don't consider semicolons part of the statement. As per the
    stmt macro matcher, they're not a part of it. They are a part
    of the block expression though, so the grammar is updated to
    show that.

  2. Try to better describe what a block expression is. By saying
    it's like a module, we're probably confusing people.

  3. Show an example of using a block expression to force moving a
    value out of a variable. I personally didn't understand what
    that fully entailed until I wrote the example.

  4. Link to the unsafety section instead of redescribing what
    unsafe is allowed to do in the unsafe block section.

1. Don't consider semicolons part of the statement. As per the
   `stmt` macro matcher, they're not a part of it. They are a part
   of the block expression though, so the grammar is updated to
   show that.

2. Try to better describe what a block expression is. By saying
   it's like a module, we're probably confusing people.

3. Show an example of using a block expression to force moving a
   value out of a variable. I personally didn't understand what
   that fully entailed until I wrote the example.

4. Link to the unsafety section instead of redescribing what
   unsafe is allowed to do in the unsafe block section.
@Havvy
Copy link
Contributor Author

Havvy commented Aug 20, 2018

@matthewjasper Is there anything preventing this from being merged?

@Havvy Havvy added New Content Missing features or aspects of language not currently documented. Language Cleanup Improvements to existing language which is correct but not clear, or missing examples, or the like. labels Aug 20, 2018
@matthewjasper matthewjasper merged commit 0b877de into rust-lang:master Aug 20, 2018
@matthewjasper
Copy link
Contributor

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Language Cleanup Improvements to existing language which is correct but not clear, or missing examples, or the like. New Content Missing features or aspects of language not currently documented.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants