rust/tests/ui/nll/issue-52534-2.rs
2023-01-11 09:32:08 +00:00

15 lines
169 B
Rust

fn foo(x: &u32) -> &u32 {
let y;
{
let x = 32;
y = &x
//~^ ERROR does not live long enough
}
println!("{}", y);
x
}
fn main() { }