找出局部引用里的 bug

来自 生命周期
Rust 1.98 入门 4分钟 找出 1处问题

找出为什么泛型生命周期不能让这个返回值合法。

Rust
fn status_text<'a>() -> &'a str {
    let status = String::from("ready");
    status.as_str()
}
在试验场中打开
报告错误