rustc: Anonymous lifetimes within structs are refused too rigorously #12741
Labels
A-lifetimes
Area: Lifetimes / regions
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
I have the following code:
Which currently produces this error:
This is apparently caused by the closure passed to the referenced function not having a lifetime.
IMHO this should be perfectly legal, because the struct does not actually reference the closure itself.
The text was updated successfully, but these errors were encountered: