2018-04-11 00:38:35 +02:00
|
|
|
error[E0597]: `x` does not live long enough
|
2018-12-25 08:56:47 -07:00
|
|
|
--> $DIR/regions-escape-loop-via-variable.rs:11:13
|
2018-04-11 00:38:35 +02:00
|
|
|
|
|
|
|
|
LL | let x = 1 + *p;
|
2018-09-28 09:21:10 -07:00
|
|
|
| -- borrow used here, in later iteration of loop
|
2018-04-11 00:38:35 +02:00
|
|
|
LL | p = &x;
|
|
|
|
| ^^ borrowed value does not live long enough
|
|
|
|
LL | }
|
2018-07-22 16:02:31 +01:00
|
|
|
| - `x` dropped here while still borrowed
|
2018-04-11 00:38:35 +02:00
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0597`.
|