#Rust: Is there a way to see the lifetimes inferred by the compiler?
That would be a useful tool for learning and teaching lifetimes.
https://users.rust-lang.org/t/is-there-a-way-to-see-the-lifetimes-inferred-by-the-compiler/88927
Is there a way to see the lifetimes inferred by the compiler?

That would be a useful tool for learning and teaching lifetimes.

The Rust Programming Language Forum
@rauschma I’d love to see some way of doing this. Not quite sure how you’d get the compiler to do this, though. You can get it to show the types of certain variables by prefixing them with an unknown unit type. However, I don’t know of any way to do this with lifetimes. It’s a good idea.