Conversation

It may be more accessible this way: If you have a function `fn x<'a>(&'a Something)` and you call it, the compiler has a concrete lifetime (the one of Something) to check. So it fills in the lifetime parameter through the actual time that Something lives.
1
But in the case of closures and some other things (which may be defined, but called _later_ in a function-like manner), we don't know the lifetime in the scope of the caller yet. So `for<'a>` means "independent of the situation at the call site, this must _always be safe_".
1
1
Hmm just gotta be careful here, forall is not a lambda - it’s the type of a lambda! It gets a bit weird in Rust as they are only used within trait constraints, and you never see the corresponding lifetime functions, nor can you construct them yourself.
1
1
Lifetimes are irrelevant at runtime however, meaning it's possible! Unless I am really mistaken, I don't see any reason why you shouldn't be able to write lifetime polymorphic closures, for example.
1
Show replies