1 2 3 4 5 6 7 8 9 10 11 12 13 14
fn foo(x: &u32) -> &u32 { let y; { let x = 32; y = &x //~^ ERROR does not live long enough } println!("{}", y); x } fn main() { }