fn foo<F, T, U>(f: F)
where
F: for<'any> Fn(&'any T) -> U
{}
The higher-ranked binder -- for<'any> -- means F has to accept any input lifetime.
Another important thing to know is that generic type parameters like U must resolve to a single, particular type. Additionally, types that differ by lifetime are distinct types.
So F has to take in &T with any lifetime, but for every input lifetime, has to output the same singular type U. That means the output type can't contain ("capture") the input lifetime -- because that would be a different output type per lifetime.
Hopefully that explains why 1, 2, and 3 don't compile.
4 and 5 can compile because the compiler infers a single lifetime for the inner reference (which you effectively return a copy of). It has to, because the inner &Pair corresponds to T, a generic type parameter -- which has to resolve to a single type.
9 and 10 don't compile because they are created outside of a context annotated with a Fn bound, where the compiler uses heuristics to try to determine the closure "signature" that aren't influenced by passing it to foo later. (The heuristics are particularly bad around higher-ranked signatures.)