Skip to content

weird-exprs: if if if if #61892

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
Jun 17, 2019
Merged

weird-exprs: if if if if #61892

merged 1 commit into from
Jun 17, 2019

Conversation

rijenkii
Copy link
Contributor

The if keyword can be chained as long as there are enough {...} else {...} following, and they all return a bool (not required for the last one).
if expression can be also put inside a match arm guard, thus making the whole thing a little bit more confusing.

Discovered this clusterfunk while reading the reference because I have nothing better to do.

@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 @nikomatsakis (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. Due to 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 the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 16, 2019
@rijenkii rijenkii changed the title if if if if weird-exprs: if if if if Jun 16, 2019
@Centril
Copy link
Contributor

Centril commented Jun 16, 2019

Sure... why not...

r? @Centril @bors r+ rollup

@bors
Copy link
Collaborator

bors commented Jun 16, 2019

📌 Commit 7c84efd has been approved by Centril

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 16, 2019
@bors
Copy link
Collaborator

bors commented Jun 16, 2019

⌛ Testing commit 7c84efd with merge 70456a6...

bors added a commit that referenced this pull request Jun 16, 2019
weird-exprs: if if if if

The `if` keyword can be chained as long as there are enough `{...} else {...}` following, and they all return a `bool` (not required for the last one).
`if` expression can be also put inside a `match` arm guard, thus making the whole thing a little bit more confusing.

Discovered this clusterfunk while reading the reference because I have nothing better to do.
@bors
Copy link
Collaborator

bors commented Jun 17, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: Centril
Pushing 70456a6 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jun 17, 2019
@bors bors merged commit 7c84efd into rust-lang:master Jun 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants