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

Test interaction between async { ... } and ?, return, and break #63387

Merged
merged 1 commit into from
Aug 9, 2019

Conversation

Centril
Copy link
Contributor

@Centril Centril commented Aug 8, 2019

Per the second checkbox in #62121 (comment), test that async { .. } blocks:

  1. do not allow break expressions.
  2. get targeted by return and not the parent function.
  3. get targeted by ? and not the parent function.

Works towards resolving blockers in #63209.

r? @cramertj

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 8, 2019
@Centril Centril force-pushed the async-block-control-flow-tests branch from 49351aa to 21a6c21 Compare August 8, 2019 20:53
@cramertj
Copy link
Member

cramertj commented Aug 8, 2019

@bors r+

@bors
Copy link
Contributor

bors commented Aug 8, 2019

📌 Commit 21a6c214f0bcfb2881ae80d28141185e17713f97 has been approved by cramertj

@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 Aug 8, 2019
@Centril
Copy link
Contributor Author

Centril commented Aug 8, 2019

@bors rollup

@rust-highfive

This comment has been minimized.

@Centril Centril force-pushed the async-block-control-flow-tests branch from 21a6c21 to 48fbf48 Compare August 8, 2019 22:21
@Centril
Copy link
Contributor Author

Centril commented Aug 8, 2019

Woops; forgot to --bless; fixed.

@bors r=cramertj

@bors
Copy link
Contributor

bors commented Aug 8, 2019

📌 Commit 48fbf48 has been approved by cramertj

Centril added a commit to Centril/rust that referenced this pull request Aug 8, 2019
…sts, r=cramertj

Test interaction between `async { ... }` and `?`, `return`, and `break`

Per the second checkbox in rust-lang#62121 (comment), test that `async { .. }` blocks:
1. do not allow `break` expressions.
2. get targeted by `return` and not the parent function.
3. get targeted by `?` and not the parent function.

Works towards resolving blockers in rust-lang#63209.

r? @cramertj
bors added a commit that referenced this pull request Aug 8, 2019
Rollup of 6 pull requests

Successful merges:

 - #63162 (Miri tests: use xargo to build separate libstd)
 - #63289 (Don't recommend `extern crate` syntax)
 - #63373 (gitignore: add comment explaining policy)
 - #63374 (move of packed fields might or might not occur when they actually are sufficiently aligned)
 - #63381 (reduce visibility)
 - #63387 (Test interaction between `async { ... }` and `?`, `return`, and `break`)

Failed merges:

r? @ghost
@bors bors merged commit 48fbf48 into rust-lang:master Aug 9, 2019
@Centril Centril deleted the async-block-control-flow-tests branch August 9, 2019 03:29
Centril added a commit to Centril/rust that referenced this pull request Aug 20, 2019
…amertj

Stabilize `async_await` in Rust 1.39.0

Here we stabilize:
- free and inherent `async fn`s,
- the `<expr>.await` expression form,
- and the `async move? { ... }` block form.

Closes rust-lang#62149.
Closes rust-lang#50547.

All the blockers are now closed.

<details>
- [x] FCP in rust-lang#62149
- [x] rust-lang#61949; PR in rust-lang#62849.
- [x] rust-lang#62517; PR in rust-lang#63376.
- [x] rust-lang#63225; PR in rust-lang#63501
- [x] rust-lang#63388; PR in rust-lang#63499
- [x] rust-lang#63500; PR in rust-lang#63501
- [x] rust-lang#62121 (comment)
    - [x] Some tests for control flow (PR rust-lang#63387):
          - `?`
          - `return` in `async` blocks
          - `break`
    - [x] rust-lang#61775 (comment), i.e. tests for rust-lang#60944 with `async fn`s instead). PR in rust-lang#63383

</details>

r? @cramertj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

4 participants