-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
Closed
Description
#104321 changed async blocks/functions to not go through from_generator / GenFuture, but made those generators implement Future directly.
Though inside those special generators, it is still necessary to hide the &Context<'_> poll argument behind an unsafe ResumeTy wrapper which removes any lifetime constraints.
It should be possible to remove that type, and the unsafe get_context function which turns it back into a &Context<'_> to poll child futures.
With #104321 the compiler already "cheats" and magically turns the &Context<'_> of the Future::poll call into an internal Generator::resume(ResumeTy).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels