rust/src/test/ui/error-codes/E0597.stderr

15 lines
460 B
Plaintext
Raw Normal View History

2018-02-07 19:35:35 -08:00
error[E0597]: `y` does not live long enough
2018-12-25 08:56:47 -07:00
--> $DIR/E0597.rs:8:17
2018-02-07 19:35:35 -08:00
|
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`.