2018-10-17 15:18:24 -05:00
|
|
|
error[E0597]: `x` does not live long enough
|
2019-04-07 10:07:36 -05:00
|
|
|
--> $DIR/cast_static_lifetime.rs:5:19
|
2018-10-17 15:18:24 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | let y: &u32 = (&x) as &'static u32;
|
2018-10-14 09:12:02 -05:00
|
|
|
| ^^^^----------------
|
|
|
|
| |
|
|
|
|
| borrowed value does not live long enough
|
|
|
|
| type annotation requires that `x` is borrowed for `'static`
|
2018-10-17 15:18:24 -05:00
|
|
|
LL | }
|
|
|
|
| - `x` dropped here while still borrowed
|
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0597`.
|