Skip to content

It is hard to see the return types of async functions #69781

@NickeZ

Description

@NickeZ

In the documentation it is hard to distinguish async functions from normal functions.

Take for example warp::Server. Both run and bind returns futures. But when I was reading the docs I thought only bind was asynchronous. And I had a lot of problems getting my code to work due to wrong assumptions about the types...

My suggestion is that async functions are listed in a separate listing, have another color, use the correct return type (Future) or in some other way stand out.

ref: https://www.reddit.com/r/rust/comments/fef3zh/minor_rant_about_async_syntax_and_documentation/

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-async-awaitArea: Async & AwaitA-rustdoc-uiArea: Rustdoc UI (generated HTML)AsyncAwait-TriagedAsync-await issues that have been triaged during a working group meeting.C-enhancementCategory: An issue proposing an enhancement or a PR with one.E-mediumCall for participation: Medium difficulty. Experience needed to fix: Intermediate.P-mediumMedium priorityT-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.T-rustdoc-frontendRelevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions