Skip to content

Improve information about loops #24750

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
Apr 24, 2015
Merged

Improve information about loops #24750

merged 2 commits into from
Apr 24, 2015

Conversation

withoutboats
Copy link
Contributor

  1. Moved 'while' section below 'loop', 'break', and 'continue'; 2) Added information to 'while' and 'for' loops that they interact with 'break' and 'continue' and may have a lifetime label. 3) Clarified labeling syntax on the infinite loops.

1) Moved 'while' section below 'loop', 'break', and 'continue'; 2) Added information to 'while' and 'for' loops that they interact with 'break' and 'continue' and may have a lifetime label. 3) Clarified labeling syntax on the infinite loops.
@rust-highfive
Copy link
Contributor

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. The way Github handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see CONTRIBUTING.md for more information.

@steveklabnik
Copy link
Member

Why move while down? Just curious.

@alexcrichton
Copy link
Member

r? @steveklabnik

@withoutboats
Copy link
Contributor Author

It was so it would not be antecedent to the information about break and continue (which it now references), and because (like for) it builds on the basic concept of loop.

@steveklabnik
Copy link
Member

Seems like a good reason. Thanks!

@steveklabnik
Copy link
Member

@bors: r+ rollup

@bors
Copy link
Collaborator

bors commented Apr 24, 2015

📌 Commit 3ae6a5e has been approved by steveklabnik

@Diggsey
Copy link
Contributor

Diggsey commented Apr 24, 2015

The grammar for "while let" loops is missing the lifetime label and associated comment that break/continue work with it. (I've tested and rust does allow labels and break/continue here)

Manishearth added a commit to Manishearth/rust that referenced this pull request Apr 24, 2015
 1) Moved 'while' section below 'loop', 'break', and 'continue'; 2) Added information to 'while' and 'for' loops that they interact with 'break' and 'continue' and may have a lifetime label. 3) Clarified labeling syntax on the infinite loops.
@bors bors merged commit 3ae6a5e into rust-lang:master Apr 24, 2015
@withoutboats withoutboats deleted the patch-1 branch April 25, 2015 18:00
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.

6 participants