Lifetime inference misses what seems like a simple case #15735
Labels
A-lifetimes
Area: Lifetimes / regions
A-type-system
Area: Type system
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
I distilled this from an example in some actual code I have, although I'm not entirely sure that the distilled example reflects the problem in my original code. The program
fails to compile with this error:
If I change the program slightly so that
foo
returns aB<'b>
then everything works fine:The text was updated successfully, but these errors were encountered: