Skip to content

Supports for async closures #823

@ShoyuVanilla

Description

@ShoyuVanilla

c.c rust-lang/rust-analyzer#19196

I'm afraid that implementing this on chalk and using on rust-analyzer would make currently ongoing rust-analyzer's trait solver migration more difficult but we need this to improve user experiences for Rust's shiny new async closures.

  1. LangItem and WellKnownTrait for AsyncFn*
  2. TyKind for async closures. rustc categorizes them to CoroutineClosure but rust-analyzer categorizes them to Closure. I'd like to follow the rustc way for consistency but this might hinder currently ongoing trait solver migration in rust-analyzer a bit
  3. Built in AsyncFn* implementation supports for async closures and functions that returns future

I'm planning to start working on this tomorrow but if this is not welcomed due to next gen solver migrations or other issues, I'll gladly look for alternatives 😄

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions