.cargo/vendor/zerocopy/tests/ui-nightly/transmute-mut-illegal-lifetime.stderr
raw| 1 | error[E0597]: `x` does not live long enough |
| 2 | --> tests/ui-nightly/transmute-mut-illegal-lifetime.rs:14:56 |
| 3 | | |
| 4 | 12 | let mut x = 0u64; |
| 5 | | ----- binding `x` declared here |
| 6 | 13 | // It is illegal to increase the lifetime scope. |
| 7 | 14 | let _: &'static mut u64 = zerocopy::transmute_mut!(&mut x); |
| 8 | | ---------------- ^^^^^^ borrowed value does not live long enough |
| 9 | | | |
| 10 | | type annotation requires that `x` is borrowed for `'static` |
| 11 | 15 | } |
| 12 | | - `x` dropped here while still borrowed |