-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
async-await: [WIP] replace std await! macro with await syntax #1080
Conversation
`await` syntax was implemented in rust-lang/rust#60586, and nightly-2019-05-09 has been released with the changes. Also, `await!` macro will be removed in the future.
By the way, should we rename |
Thanks for opening this! We were thinking of having a |
I think we will have to remove |
Alternatively, we fork off 0.1 and leave it as is and start updating master... |
Sorry if i'm skipping some detail here-- it should be possible to update only that one crate to 2018 without moving it to a separate workspace. |
It probably can only be done with Rust 1.31 or later. See also #935 (comment). |
@cramertj maybe? I remember trying that initially, but hit problems... |
…akis,Centril Remove the old await! macro This doesn't work anymore, and its continued presence is cause for confusion. `yield` can no longer be used to return `Pending` from an `async` body. cc rust-lang#60660 cc @taiki-e cc tokio-rs/tokio#1080
I added some commits. Hopefully, after #1082 is merged, just merge the master into this PR and CI will success. |
Thanks for this ❤️ I pulled this PR into #1082, so I will close this. |
Motivation
await
syntax was implemented in rust-lang/rust#60586, and nightly-2019-05-09 has been released with the changes. Also,await!
macro will be removed in the future.Solution
await
syntax only works in the 2018 edition, so this PR has not replaced some stdawait!
macros yet (it needs to bump the minimum support version).This PR currently uses a way that does not bump the minimum supported version, but this is blocked by
std::r#await!
macro not working (see rust-lang/rust#60660).cc @carllerche @davidbarsky