Skip to content

Document the loop_break_value feature #699

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 2 commits into from
Jun 2, 2017
Merged

Document the loop_break_value feature #699

merged 2 commits into from
Jun 2, 2017

Conversation

pietroalbini
Copy link
Member

This pull requests adds a section in the new features appendix about the loop_break_value feature (which should be stabilized after all the documentation is ready), tracked in issue rust-lang/rust#37339.

I reused the basic example I made for Rust by Example, but if something more realistic (maybe with threads and channels) is OK here I'm happy to change it.

@carols10cents
Copy link
Member

Thanks! Looks like this is going to need the feature added to the code examples too, like this pr to rust-lang/rust does.

@pietroalbini
Copy link
Member Author

Is the #![feature] really needed? This feature should be stabilized soon (I sent the stabilization PR a few minutes ago), and I think it doesn't make sense to then send another PR to remove the attributes.

@carols10cents
Copy link
Member

It's making the build fail, I'm fine letting this PR sit until it stabilizes if that's ok with you, but I'm not going to merge it with failing tests.

@pietroalbini
Copy link
Member Author

Sure. Let's wait a bit for this.

@dhardy
Copy link

dhardy commented May 17, 2017

Isn't this a duplicate of #41857? Or are there two completely separate books?

@pietroalbini
Copy link
Member Author

AFAIK the unstable book is different than the "standard" book. By the way, I didn't notice your pull request when I wrote this because you didn't link it to the tracking issue (and apparently you didn't link properly your pull request in the reference either) :).

I think for the "newest features" appendix a brief description (like in this PR) to let the reader know this feature exists and how to use it is better than a more in-depth explaination like in your PR, though.

@dhardy
Copy link

dhardy commented May 17, 2017

Yes, I seem to have forgotten a few links, sorry about that.

Unfortunately your stabilisation PR and my unstable book PR conflict, so maybe I need to move my additions @carols10cents ?

This PR looks fine to me BTW.

@carols10cents
Copy link
Member

Unfortunately your stabilisation PR and my unstable book PR conflict, so maybe I need to move my additions @carols10cents ?

I don't understand what you mean by "conflict", they're in totally different repos?

@pietroalbini
Copy link
Member Author

I think he means his PR to add the docs in the unstable book conflicts with my PR to stabilize the feature (which removes the page in the unstable book).

@steveklabnik
Copy link
Member

Hey @dhardy, @pietroalbini

So, the idea is this: the Unstable Book is for WIP docs while a feature is unstable. Once the feature becomes stable, it gets removed from the Unstable Book, and then moved here.

However, that process makes some assumptions, that is, not that the docs in the unstable book are added right before something is made stable 😄 I didn't realize that this feature was so close to being stable, given that life has been busy lately, so they're not so much in conflict as rust-lang/rust#41857 will be very short-lived.

Here's my plan: I'm going to merge that PR, since @dhardy should get some credit for his work, and this confusion is mine. Then, if @pietroalbini rebases their PR, it will remove those docs, and everything is fine.

@dhardy
Copy link

dhardy commented May 17, 2017

Thanks @steveklabnik but it still wastes my docs. Oh well, if they're not useful, so be it.

@pietroalbini
Copy link
Member Author

The stabilization PR was merged \o/ Should we merge this now?

@steveklabnik
Copy link
Member

Let me restart Travis.

@steveklabnik
Copy link
Member

Looks like it missed the nightly so we'll have to wait until tomorrow.

@steveklabnik
Copy link
Member

Hmm, travis is still using an old nightly of rust for some reason. Maybe rebase this, @pietroalbini ?

@pietroalbini
Copy link
Member Author

What. Travis is still using nightly-2017-04-11-x86_64-unknown-linux-gnu... And not only on my branch, but as far as I can see on all the recent builds in this repo :/

@carols10cents
Copy link
Member

Oops. We pinned nightly because there was a day that rustup wasn't able to install nightly, and that was supposed to be temporary, but I forgot to put it back to just nightly. I just added a commit to master to unpin nightly, mind rebasing again? Sorry :-/

This commit adds a section to the newest features appendix about the
loop_break_value feature, which should be stabilized soon.
Copy link
Member

@carols10cents carols10cents left a comment

Choose a reason for hiding this comment

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

Looks good! Thank you!!! ❤️

@carols10cents carols10cents merged commit f478df7 into rust-lang:master Jun 2, 2017
@pietroalbini pietroalbini deleted the loop_break_value branch June 2, 2017 15:17
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.

4 participants