Open angelsl opened 3 years ago
This may or may not be the same issue as #70263.
I've triggered almost this exact problem.
@rustbot labels +AsyncAwait-Triaged +WG-async
We reviewed this today in WG-async triage.
This is indeed not supported in Rust today. You can't have higher ranked closures that return futures that capture higher ranked arguments.
You're going to want to use async
closures for this (currently on nightly).
Playground
I'm trying to use the solution suggested for a separate problem here.
The solution works with a coerced function item, but not a closure that is virtually identical.
produces