2018-02-07 19:35:35 -08:00
|
|
|
error[E0597]: `y` does not live long enough
|
|
|
|
--> $DIR/E0597.rs:18:17
|
|
|
|
|
|
2018-02-23 03:42:32 +03:00
|
|
|
LL | x.x = Some(&y);
|
2018-02-07 19:35:35 -08:00
|
|
|
| ^ borrowed value does not live long enough
|
2018-02-25 02:01:39 +03:00
|
|
|
LL | //~^ `y` does not live long enough [E0597]
|
2018-02-23 03:42:32 +03:00
|
|
|
LL | }
|
2018-02-07 19:35:35 -08:00
|
|
|
| - `y` dropped here while still borrowed
|
|
|
|
|
|
|
|
|
= note: values in a scope are dropped in the opposite order they are created
|
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
2018-03-03 15:59:40 +01:00
|
|
|
For more information about this error, try `rustc --explain E0597`.
|