Spot the bug in the local reference

from Lifetime elision and annotations
Rust 1.98 beginner 4 min 1 issue to find

Find why adding a generic lifetime does not make this generated function valid.

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