Skip to content

Emit semantic token modifier async for impl Future #22407

@d3d9

Description

@d3d9

I randomly discovered async token modifiers getting emitted and thought it might be an interesting thing to set up to get highlighted using a specific color.
However, I noticed that some futures did not get that token modifier, leading to a confusing result, so I disabled it for now. Libraries like embassy seem to use a lot of manually implemented impl Future fns or structs that impl Future.

It would be great if the async token modifier could also get emitted for functions that don't use the async keyword but return impl Future, as well as ones that return a struct that impls Future.

Examples, note the different highlighting where the greenish color comes from the async token modifier and the yellowish one is the usual one for functions/methods:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-featureCategory: feature request

    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