I have a lifetime compiler error that has broken my mental model of how I thought lifetimes are used.
The intent of the code is to prevent at compile time, by use of a lifetime parameter and
Ptr instance from outliving the
Allocator instance that manages the memory that
Ptr points to. I borrowed and mangled the pattern from https://github.com/rphmeier/allocators/
I’ve broken down my code to both represent the overall picture of what I want to do but to also be as minimal as I can make it to reproduce the error.
When the compiler says that
syms does not live long enough, I simply do not understand the error in this context. The concept of a lifetime parameter and what it means has become too abstract for my brain to process
There may well be other eyebrow-raising features of my code, I’d be glad of any feedback.