Skip to content
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

Feature/loop break value #56

Merged
merged 4 commits into from
May 26, 2017

Conversation

dhardy
Copy link
Contributor

@dhardy dhardy commented May 17, 2017

Continue from @pietroalbini's PR #53.

Tracking issue: #37339.

This makes quite a few changes to the structure and content of the whole loops section, hopefully for the better.

Really this whole document needs an index, but that's another job.

pietroalbini and others added 3 commits May 12, 2017 11:51
An inline code snippet was using triple quotes instead of single ones,
breaking syntax highlight in vim.
This commit introduces to the reference the changes made by the
loop_break_value feature, defined in RFC 1624.
@dhardy
Copy link
Contributor Author

dhardy commented May 17, 2017

Note: I had to use #![feature(loop_break_value)] to make the tests pass, but of course we don't want that in the final version.

loop, but `continue 'label` may be used to specify the loop affected.
A `continue` expression is only permitted in the body of a loop.

### Break-with-value
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be worded a bit better. Something like "break with return values" maybe?

Havvy added a commit to Havvy/reference that referenced this pull request May 17, 2017
I went with "associated break" here to match the terminology
given by PR rust-lang#56.
Copy link
Member

@steveklabnik steveklabnik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me! We should wait until the tests actually pass due to the feature landing, though 👍

@matthewjasper
Copy link
Contributor

I think this just needs the tests to be rerun (by pushing something) to be merged?

@steveklabnik
Copy link
Member

@matthewjasper yup and it now passes. Woo!

Thanks @dhardy !

@steveklabnik steveklabnik merged commit d924309 into rust-lang:master May 26, 2017
Copy link

@haaami01 haaami01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Required

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 this pull request may close these issues.

5 participants