2018-10-17 15:18:24 -05:00
|
|
|
error[E0597]: `x` does not live long enough
|
|
|
|
--> $DIR/cast_static_lifetime.rs:16:19
|
|
|
|
|
|
|
|
|
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`.
|