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