2017-12-11 17:29:31 +00:00
|
|
|
error[E0597]: `y` does not live long enough
|
2019-04-07 15:07:36 +00:00
|
|
|
--> $DIR/capture-ref-in-struct.rs:18:16
|
2017-11-22 22:39:46 +00:00
|
|
|
|
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | y: &y,
|
2017-12-14 17:57:34 +00:00
|
|
|
| ^^ borrowed value does not live long enough
|
2017-11-22 22:39:46 +00:00
|
|
|
...
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | }
|
2018-07-22 15:02:31 +00:00
|
|
|
| - `y` dropped here while still borrowed
|
2022-06-08 18:07:59 +00:00
|
|
|
LL |
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | deref(p);
|
2017-12-12 20:29:37 +00:00
|
|
|
| - borrow later used here
|
2017-11-22 22:39:46 +00:00
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
2018-03-03 14:59:40 +00:00
|
|
|
For more information about this error, try `rustc --explain E0597`.
|