impl Trait in return position implicitly captures non-'static
type parameter despite + 'static
#132364
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code
(playground)
Current output
Desired output
I'm not sure, but adding
+ use<>
to the function's return type explains what the issue is actually thatimpl Trait
implicitly captured the trait bound:Rationale and extra context
It's impossible to debug (or google) otherwise, and I only figured it out because I remembered
+ use<>
from the stabilization blog postOther cases
No response
Rust Version
rustc 1.82.0
Anything else?
No response
The text was updated successfully, but these errors were encountered: