Lifetimes in Rust are often compared to pointers in C and C++, both features tend to trip up new users of each language, and have a reputation for being difficult to wrap one's head around. When I learned C++, I was lucky enough to not have significant trouble with pointers, but the same is not true of Rust's lifetimes, which I am having significant trouble getting a precise and accurate mental model for.
This difficulty has prompted reflection as to why C and C++'s pointers were relatively easy for me, and the conclusion that I have come to is that I had a precise explanation of how they work early on (e.g. a description of what computer memory is, which gives a good understanding of what a memory address is, and pointers are just slightly glorified-to-fit-C++'s-type-system memory addresses). With Rust, however, I have not seen any such sources — most sources that I can find talk about Rust's lifetimes in human-centric terms, talking about variables being active "during" other variables, when, what I really need to properly understand them, is to understand what they are in the computer, or in Rustc's code and algorithms. During compilation, there is no concept of "during," only abstract syntax trees, LLVM IR, source code, and such.
As such, I ask, during compilation, what are lifetimes really, at the level of ASTs, etc.? If I wanted to go about implementing a similar system in a hypothethical compiler of my own, what would that look like?