This initiative is part of the overall async vision roadmap.
- Able to write
async fn
in traits and trait impls- Able to easily declare that
T: Trait + Send
where "every async fn inTrait
returns aSend
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 easily declare that
- Able to write "async fn drop" to declare that the destructor may await
- Support for async closures
Milestone | State | Key participants |
---|---|---|
Author evaluation doc for static async trait | done 🎉 | tmandry |
Author evaluation doc for dyn async trait | done 🎉 | tmandry |
Author evaluation doc for async drop | 💤 | |
Author evaluation doc for impl Trait in traits | done | tmandry |
Stabilize type alias impl trait | in-progress | oli-obk |
Stabilize generic associated types | done 🎉 | jackh726 |
Author RFC for async fn in traits | done 🎉 | |
Author evaluation doc for async closures | blog posts authored, doc pending | nikomatsakis |
Author RFC for impl trait in traits | done | |
Feature complete for async fn in traits | done 🎉 | compiler-errors |
Feature complete for impl Trait in traits | done 🎉 | compiler-errors |
Feature complete for async drop | 💤 | |
Feature complete for async closures | 💤 | |
Stabilize async fn in traits | proposed | compiler-errors |
Stabilize impl trait in traits | proposed | compiler-errors |
Stabilize async drop | 💤 | |
Stabilize async closures | 💤 |
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.