fork/rust
git clone https://git.julia.blue/fork/rust
f3e1a954d2e
1.41.1
1error: lifetime may not live long enough 2 --> $DIR/issue-58053.rs:6:33 3 | 4LL | let f = |x: &i32| -> &i32 { x }; 5 | - ---- ^ returning this value requires that `'1` must outlive `'2` 6 | | | 7 | | return type of closure is &'2 i32 8 | let's call the lifetime of this reference `'1` 9 10error: lifetime may not live long enough 11 --> $DIR/issue-58053.rs:10:25 12 | 13LL | let g = |x: &i32| { x }; 14 | - - ^ returning this value requires that `'1` must outlive `'2` 15 | | | 16 | | return type of closure is &'2 i32 17 | let's call the lifetime of this reference `'1` 18 19error: aborting due to 2 previous errors 20