Spot the bug in the local reference

from Lifetimes
Rust 1.98 beginner 4 min 1 issue to find

Find why the generic lifetime does not make this return valid.

Rust
fn status_text<'a>() -> &'a str {
    let status = String::from("ready");
    status.as_str()
}
Open in playground
Report an error