let s1 = String::from("abcd"); let result; { let s2 = String::from("x"); result = longest(&s1, &s2); // 错误:result 生命周期不能比 s2 长 } println!("{}", result);