1 2 3 4 5 6 7 8 9 10 11
fn main() { let str = dangle(); println!("{str}"); } fn dangle() -> &String { let s = String::from("Hello"); &s }