2018-09-18 19:48:47 -05:00
|
|
|
error[E0597]: `x` does not live long enough
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/issue-52534-2.rs:9:9
|
2018-09-18 19:48:47 -05:00
|
|
|
|
|
|
|
|
LL | y = &x
|
|
|
|
| ^^^^^^ borrowed value does not live long enough
|
2018-11-27 03:56:36 -06:00
|
|
|
LL | //~^ ERROR does not live long enough
|
2018-09-18 19:48:47 -05:00
|
|
|
LL | }
|
|
|
|
| - `x` dropped here while still borrowed
|
|
|
|
LL |
|
|
|
|
LL | println!("{}", y);
|
|
|
|
| - borrow later used here
|
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0597`.
|