#![allow(dead_code, deprecated, unused_variables, unused_mut)] struct R<'a>(&'a i32); unsafe fn extend_lifetime<'b>(r: R<'b>) -> R<'static> { unsafe { std::mem::transmute::, R<'static>>(r) } } unsafe fn shorten_invariant_lifetime<'b, 'c>(r: &'b mut R<'static>) -> &'b mut R<'c> { unsafe { std::mem::transmute::<&'b mut R<'static>, &'b mut R<'c>>(r) } } fn main() {}