error[E0621]: explicit lifetime required in the type of `y` --> $DIR/issue-40288-2.rs:17:9 | LL | fn lifetime_transmute_slice<'a, T: ?Sized>(x: &'a T, y: &T) -> &'a T { | -- help: add explicit lifetime `'a` to the type of `y`: `&'a T` ... LL | slice[0] = y; | ^^^^^^^^^^^^ lifetime `'a` required error[E0621]: explicit lifetime required in the type of `y` --> $DIR/issue-40288-2.rs:32:9 | LL | fn lifetime_transmute_struct<'a, T: ?Sized>(x: &'a T, y: &T) -> &'a T { | -- help: add explicit lifetime `'a` to the type of `y`: `&'a T` ... LL | dst.head = y; | ^^^^^^^^^^^^ lifetime `'a` required error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0621`.