Skip to content

Support async fn in trait methods (async/await follow-up) #2739

Open
@bstrie

Description

@bstrie

As noted by the author of the async/await RFC during its discussion:

If the answer is just "this can't be used on trait methods", that removes a lot of the utility of this feature, especially for libraries.

This RFC does not propose enabling async trait methods. I agree that trait methods are an extremely valuable use case for async notation, and from my perspective it is the absolute highest priority extension after this initial MVP proposal (in contrast to things like async generators).

#2394 (comment)

Now that the async/await MVP is tentatively approaching stabilization, this is the next logical feature that users are going to start asking about. Discussion of how to support this feature is currently fragmented across various other async/await issues threads, so I have opened this issue in order to centralize discussion (and hopefully to have someone in-the-know summarize the current obstacles and plans).

cc @withoutboats

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-async-awaitProposals re. async / awaitA-traitsTrait system related proposals & ideasAsyncAwait-TriagedT-langRelevant to the language team, which will review and decide on the RFC.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions