2018-12-11 15:49:40 -06:00
|
|
|
error: lifetime may not live long enough
|
2018-10-20 14:00:57 -05:00
|
|
|
--> $DIR/issue-54124.rs:4:22
|
|
|
|
|
|
|
|
|
LL | fn test<'a>() {
|
|
|
|
| -- lifetime `'a` defined here
|
2018-12-11 15:49:40 -06:00
|
|
|
LL | let _:fn(&()) = |_:&'a ()| {}; //~ ERROR lifetime may not live long enough
|
2018-10-20 14:00:57 -05:00
|
|
|
| ^ - let's call the lifetime of this reference `'1`
|
|
|
|
| |
|
|
|
|
| requires that `'1` must outlive `'a`
|
|
|
|
|
2018-12-11 15:49:40 -06:00
|
|
|
error: lifetime may not live long enough
|
2018-10-20 14:00:57 -05:00
|
|
|
--> $DIR/issue-54124.rs:4:22
|
|
|
|
|
|
|
|
|
LL | fn test<'a>() {
|
|
|
|
| -- lifetime `'a` defined here
|
2018-12-11 15:49:40 -06:00
|
|
|
LL | let _:fn(&()) = |_:&'a ()| {}; //~ ERROR lifetime may not live long enough
|
2018-10-20 14:00:57 -05:00
|
|
|
| ^ requires that `'a` must outlive `'static`
|
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|