rust-analyzer
rust-analyzer copied to clipboard
fix: Fix return type of async closures.
May fix #12957
Actually, this doesn't yet fix the issue, it gives impl Future<Output = {unknown}>, not impl Future<Output = u8> as it should.

(I also forgot to tidy, oops)
It now gives correct hints for the example in #12957.

(The {unknown} at the end of test_params is not an issue with this PR, as it also occurs for non-async closures, and on the master branch).
:umbrella: The latest upstream changes (presumably #13165) made this pull request unmergeable. Please resolve the merge conflicts.
:umbrella: The latest upstream changes (presumably #13209) made this pull request unmergeable. Please resolve the merge conflicts.
Can someone knowing the type system side of r-a have a look at this?
There landed some changes revolving the closure inference code (we have landed support for generators), can you update this PR to make use of the same machinery? That will probably tell if your current approach works out fine as well.
Yes, I should have time this weekend to look into that.
I rebased, but I didn't change to use the new machinery yet. I should be able to look into that sometime this week.
:umbrella: The latest upstream changes (presumably #14222) made this pull request unmergeable. Please resolve the merge conflicts.
I went ahead and moved this to the new machinery, I hope you don't mind :)
@bors r+
:pushpin: Commit 3bf07a5f040be32cafe89977372f271673894a61 has been approved by Veykril
It is now in the queue for this repository.
:hourglass: Testing commit 3bf07a5f040be32cafe89977372f271673894a61 with merge 8330f8efc6c79455d9217ba4a9cff16091ca8da5...
:sunny: Test successful - checks-actions Approved by: Veykril Pushing 8330f8efc6c79455d9217ba4a9cff16091ca8da5 to master...