rust/tests/ui/nll/user-annotations/issue-54124.stderr

21 lines
644 B
Plaintext
Raw Normal View History

2018-12-11 15:49:40 -06:00
error: lifetime may not live long enough
2022-04-01 12:13:25 -05:00
--> $DIR/issue-54124.rs:2:22
|
LL | fn test<'a>() {
| -- lifetime `'a` defined here
2019-03-09 06:03:44 -06:00
LL | let _:fn(&()) = |_:&'a ()| {};
| ^ - 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
2022-04-01 12:13:25 -05:00
--> $DIR/issue-54124.rs:2:22
|
LL | fn test<'a>() {
| -- lifetime `'a` defined here
2019-03-09 06:03:44 -06:00
LL | let _:fn(&()) = |_:&'a ()| {};
| ^ requires that `'a` must outlive `'static`
2018-11-28 15:05:36 -06:00
error: aborting due to 2 previous errors