2017-05-27 12:58:52 -05:00
|
|
|
error[E0597]: `a` does not live long enough
|
2019-10-19 15:01:36 -05:00
|
|
|
--> $DIR/issue-36537.rs:5:13
|
2016-10-14 10:55:45 -05:00
|
|
|
|
|
2023-01-14 21:06:44 -06:00
|
|
|
LL | let a = 42;
|
|
|
|
| - binding `a` declared here
|
2018-05-25 05:36:58 -05:00
|
|
|
LL | p = &a;
|
2019-10-19 15:01:36 -05:00
|
|
|
| ^^ borrowed value does not live long enough
|
2018-05-25 05:36:58 -05:00
|
|
|
...
|
|
|
|
LL | }
|
|
|
|
| - `a` dropped here while still borrowed
|
2019-04-22 02:40:08 -05:00
|
|
|
LL | p.use_ref();
|
2023-06-22 15:30:23 -05:00
|
|
|
| - borrow later used here
|
2016-10-14 10:55:45 -05:00
|
|
|
|
2023-11-21 09:44:16 -06:00
|
|
|
error: aborting due to 1 previous error
|
2016-10-14 10:55:45 -05:00
|
|
|
|
2018-03-03 08:59:40 -06:00
|
|
|
For more information about this error, try `rustc --explain E0597`.
|