‘for all lifetimes’, does that implies ‘shortest’ is the only fit without further detail in the for<…> ?
No, the meaning is highly sensitive to where the for-all is placed. The for-all determines who has the freedom to choose the lifetime.
fn outer<'a>(s: &'a str, inner: fn(&'a str) -> Y) -> X
// outer: for<'a> fn(&'a str, fn(&'a str) -> Y) -> X
Here, the for-all tells us that the caller of outer has the freedom to choose 'a. Therefore the body of outer can't secretly stash away references to s, whereas inner could if it collaborates with the caller of outer.
Within outer, Rust will automatically typecheck the function body as if the lifetime 'a is the shortest lifetime that encloses the body and nothing else.
fn outer(inner: for<'a> fn(&'a str) -> Y) -> X
// outer: fn(for<'a> fn(&'a str) -> Y) -> X
Here, the for-all instead grants the freedom of choosing 'a to the body of outer. Therefore the inner function is subject to the whims of the outer function and can't secretly stash away references to that str.
Within inner, Rust will automatically typecheck the function body as if the lifetime 'a is the shortest lifetime that encloses the body and nothing else.