Skip to content

Argument type is not inferred in async closure #19196

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
plazmoid opened this issue Feb 21, 2025 · 3 comments · Fixed by #19232
Closed

Argument type is not inferred in async closure #19196

plazmoid opened this issue Feb 21, 2025 · 3 comments · Fixed by #19232
Assignees
Labels
A-chalk chalk related issue A-ty type system / type inference / traits / method resolution C-bug Category: bug

Comments

@plazmoid
Copy link

rust-analyzer version: rust-analyzer version: 0.3.2308-standalone

rustc version: rustc 1.85.0 (4d91de4e4 2025-02-17)

editor or extension: VSCode 1.85.2 + r-a extension

relevant settings: new clean project without deps

code snippet to reproduce:

Image

@plazmoid plazmoid added the C-bug Category: bug label Feb 21, 2025
@lnicola lnicola added the A-ty type system / type inference / traits / method resolution label Feb 21, 2025
@ShoyuVanilla
Copy link
Member

ShoyuVanilla commented Feb 21, 2025

I tracked down this a bit and it seems that this need to be fixed in chalk(async closures or functions that returns Future should have builtin AsyncFn*) or we should do some hacky workaround, but I'm afraid that either way it would hinder currently ongoing our internal migration to next-gen solver 🤔

@lnicola lnicola added the A-chalk chalk related issue label Feb 22, 2025
@ChayimFriedman2
Copy link
Contributor

Ouch, so we do need support from Chalk. I thought we managed to avoid this.

@ShoyuVanilla I think we still ought to do that, this shouldn't be a lot of changes and without them the experience using async closures is badly hurt.

@ShoyuVanilla
Copy link
Member

ShoyuVanilla commented Feb 22, 2025

Okay, I'll issue a PR to the chalk some hours later (or not if you're gonna work on this 😅 )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-chalk chalk related issue A-ty type system / type inference / traits / method resolution C-bug Category: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants