Async fn fundamentals

This initiative is part of the overall async vision roadmap.

Impact

  • Able to write async fn in traits and trait impls
    • Able to easily declare that T: Trait + Send where "every async fn in Trait returns a Send future"
    • Traits that use async fn can still be dyn safe though some tuning may be required
    • Async functions in traits desugar to impl Trait in traits
  • Able to write "async fn drop" to declare that the destructor may await
  • Support for async closures

Milestones

MilestoneStateKey participants
Author evaluation doc for static async trait🦀tmandry
Author evaluation doc for dyn async trait🦀tmandry
Author evaluation doc for async drop🦀tmandry
Author evaluation doc for impl Trait in traits💤
Stabilize type alias impl trait💤
Stabilize generic associated types💤
Author RFC for async fn in traits💤
Author evaluation doc for async closures💤
Author RFC for async fn in traits💤
Feature complete for async fn in traits💤
Feature complete for impl Trait in traits💤
Feature complete for async drop💤
Feature complete for async closures💤

Design discussions

This directory hosts notes on important design discussions along with their resolutions. In the table of contents, you will find the overall status:

  • ✅ -- Settled! Input only needed if you have identified a fresh consideration that is not covered by the write-up.
  • 💬 -- Under active discussion. Check the write-up, which may contain a list of questions or places where feedback is desired.
  • 💤 -- Paused. Not under active discussion, but we may be updating the write-up from time to time with details.