async/await: Usage of trait objects reports multiple different lifetimes when only one is used #58885
Labels
A-async-await
Area: Async & Await
AsyncAwait-Polish
Async-await issues that are part of the "polish" area
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
The following code (playground) fails to compile:
Error:
This is very surprising, since only one lifetime is visible.
Workaround (thanks to @Nemo157 ):
Defining the function as
will allow compilation.
The text was updated successfully, but these errors were encountered: