Async fns that take structs with elided lifetime parameters are broken. #60203
Labels
A-async-await
Area: Async & Await
A-lifetimes
Area: Lifetimes / regions
AsyncAwait-Polish
Async-await issues that are part of the "polish" area
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-lang
Relevant to the language team, which will review and decide on the PR/issue.
This code fails to compile with a very strange error:
Error given:
It seems the compiler fails to generate a lifetime constraint on the
impl Future<...>
the function compiles down to because there is no apparent lifetime onHasLifetime
. Replacing it withHasLifetime<'_>
fixes the problem.The text was updated successfully, but these errors were encountered: