fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #67350 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum73528e339aa

1.40.0
644 B20 linesraw
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
19error: aborting due to 2 previous errors
20