rust/src/test/ui/nll/user-annotations/issue-54124.stderr

21 lines
732 B
Plaintext
Raw Normal View History

2018-12-11 15:49:40 -06:00
error: lifetime may not live long enough
--> $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
| ^ - 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
--> $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
| ^ requires that `'a` must outlive `'static`
error: aborting due to 2 previous errors