2019-06-16 09:23:41 -05:00
|
|
|
error[E0597]: `x` does not live long enough
|
|
|
|
--> $DIR/issue-61882-2.rs:6:14
|
|
|
|
|
|
2023-01-14 21:06:44 -06:00
|
|
|
LL | let x = 0;
|
|
|
|
| - binding `x` declared here
|
2019-06-16 09:23:41 -05:00
|
|
|
LL | Self(&x);
|
|
|
|
| ^^
|
|
|
|
| |
|
|
|
|
| borrowed value does not live long enough
|
2021-09-06 16:59:24 -05:00
|
|
|
| this usage requires that `x` is borrowed for `'static`
|
2019-06-16 09:23:41 -05:00
|
|
|
LL |
|
|
|
|
LL | }
|
|
|
|
| - `x` dropped here while still borrowed
|
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0597`.
|