rust-lang / reference

The Rust Reference
https://doc.rust-lang.org/nightly/reference/
Apache License 2.0
1.22k stars 478 forks source link

document the stabilized surface of async-await #634

Open nikomatsakis opened 5 years ago

nikomatsakis commented 5 years ago

This issue is part of async-await stabilization (see https://github.com/rust-lang/rust/issues/62149). We need to document the following things:

nikomatsakis commented 5 years ago

I am taking a first pass at this.

alercah commented 4 years ago

Async closures are missing.

nikomatsakis commented 4 years ago

Async closures are not stabilized, and this issue was specific to stabilized surface area -- actually, I think we can probably close this? I'm not sure what I meant by 'document the drop order'.

nikomatsakis commented 4 years ago

@cramertj or @withoutboats do you have any idea what I might have meant by "link to drop order when that is stabilized"?

I do know that @matthewjasper recently opened a PR about https://github.com/rust-lang/reference/pull/514 drop scopes which I think mentioned something about drop order here...

alercah commented 4 years ago

They're not stabilized? Why does https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=3795067a2d54b2d90a5d807eed51a93e work then?

On Thu., Apr. 16, 2020, 12:32 Niko Matsakis, notifications@github.com wrote:

@cramertj https://github.com/cramertj or @withoutboats https://github.com/withoutboats do you have any idea what I might have meant by "link to drop order when that is stabilized"?

I do know that @matthewjasper https://github.com/matthewjasper recently opened a PR about #514 https://github.com/rust-lang/reference/pull/514 drop scopes which I think mentioned something about drop order here...

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/rust-lang/reference/issues/634#issuecomment-614759879, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE7AOVIFMLPRBMXT4226ZX3RM4XKVANCNFSM4H7SDZSQ .

cramertj commented 4 years ago

I would guess the drop order bit has to do with the changes we made around when _ arguments to async functions get dropped.

kpreid commented 1 month ago

Another thing that is currently undocumented is async block/fn future types, as types. I filed #1555 for that.