fork/rust
git clone https://git.julia.blue/fork/rust
8d69840ab92
1.43.1
1error: lifetime may not live long enough 2 --> $DIR/issue-54124.rs:4:22 3 | 4LL | fn test<'a>() { 5 | -- lifetime `'a` defined here 6LL | let _:fn(&()) = |_:&'a ()| {}; 7 | ^ - let's call the lifetime of this reference `'1` 8 | | 9 | requires that `'1` must outlive `'a` 10 11error: lifetime may not live long enough 12 --> $DIR/issue-54124.rs:4:22 13 | 14LL | fn test<'a>() { 15 | -- lifetime `'a` defined here 16LL | let _:fn(&()) = |_:&'a ()| {}; 17 | ^ requires that `'a` must outlive `'static` 18 | 19 = help: consider replacing `'a` with `'static` 20 21error: aborting due to 2 previous errors 22