Skip to content

Document auto traits implemented by the return types of async fn #65677

Open
@Aaron1011

Description

@Aaron1011

Currently, Rustdoc documents auto-trait impls for types, displaying them along with manually written impls. However, there is currently no way of telling what auto traits are implemented by the impl Future type returned by an async fn.

I'm not quite sure what the best way of displaying this is. We need to make it clear to users that the auto trait impls apply to opaque return type - not to the function itself, or to the underlying type returned by the future (e.g. the u8 in async fn foo() -> u8).

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-async-awaitArea: Async & AwaitAsyncAwait-TriagedAsync-await issues that have been triaged during a working group meeting.C-enhancementCategory: An issue proposing an enhancement or a PR with one.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions