rust-analyzer icon indicating copy to clipboard operation
rust-analyzer copied to clipboard

fix: Fix return type of async closures.

Open zachs18 opened this issue 3 years ago • 3 comments
trafficstars

May fix #12957

zachs18 avatar Aug 07 '22 02:08 zachs18

Actually, this doesn't yet fix the issue, it gives impl Future<Output = {unknown}>, not impl Future<Output = u8> as it should. image image

(I also forgot to tidy, oops)

zachs18 avatar Aug 07 '22 02:08 zachs18

It now gives correct hints for the example in #12957.

image

(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).

zachs18 avatar Aug 07 '22 06:08 zachs18

:umbrella: The latest upstream changes (presumably #13165) made this pull request unmergeable. Please resolve the merge conflicts.

bors avatar Sep 01 '22 13:09 bors

:umbrella: The latest upstream changes (presumably #13209) made this pull request unmergeable. Please resolve the merge conflicts.

bors avatar Sep 26 '22 09:09 bors

Can someone knowing the type system side of r-a have a look at this?

Veykril avatar Jan 09 '23 10:01 Veykril

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.

Veykril avatar Jan 17 '23 12:01 Veykril

Yes, I should have time this weekend to look into that.

zachs18 avatar Jan 20 '23 01:01 zachs18

I rebased, but I didn't change to use the new machinery yet. I should be able to look into that sometime this week.

zachs18 avatar Jan 23 '23 04:01 zachs18

:umbrella: The latest upstream changes (presumably #14222) made this pull request unmergeable. Please resolve the merge conflicts.

bors avatar Mar 03 '23 10:03 bors

I went ahead and moved this to the new machinery, I hope you don't mind :)

Veykril avatar Mar 15 '23 12:03 Veykril

@bors r+

Veykril avatar Mar 15 '23 13:03 Veykril

:pushpin: Commit 3bf07a5f040be32cafe89977372f271673894a61 has been approved by Veykril

It is now in the queue for this repository.

bors avatar Mar 15 '23 13:03 bors

:hourglass: Testing commit 3bf07a5f040be32cafe89977372f271673894a61 with merge 8330f8efc6c79455d9217ba4a9cff16091ca8da5...

bors avatar Mar 15 '23 13:03 bors

:sunny: Test successful - checks-actions Approved by: Veykril Pushing 8330f8efc6c79455d9217ba4a9cff16091ca8da5 to master...

bors avatar Mar 15 '23 13:03 bors