-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Async Closures Support #18591
Comments
@rustbot claim |
Actually @Veykril we seem to support them well - do you know any specific problem? |
The main issues seems to be handling fn f(it: impl AsyncFn(u32) -> i32) {
let it = it(0); // we error on this call
} as plain closures we do handle them well enough (lowering them to |
So... to fully handle it we require support from chalk (since it knows closures implements the fn traits), but this is only required for where bounds, which we don't currently report diagnostics for, and we can handle invocations ourselves. |
Alternatively We might be able to hack lowering of |
That would be harder I believe since we would have to hook into how Chalk resolves trait bounds, or handle them specifically somewhere in name resolution. Anyway I put a PR. |
Thanks for working on this @ChayimFriedman2. Regarding |
We don't really support them at all right now I believe and they are going to be stabilized soon so we should at least implement them well enough to prevent diagnostics from cropping up. #16173 might be relevant here
rust-lang/rust#132706
The text was updated successfully, but these errors were encountered: