--> $DIR/issue-40288-2.rs:17:9
|
LL | fn lifetime_transmute_slice<'a, T: ?Sized>(x: &'a T, y: &T) -> &'a T {
- | -- help: consider changing the type of `y` to : `&'a T`
+ | -- help: add explicit lifetime `'a` to the type of `y`: `&'a T`
...
LL | slice[0] = y;
| ^^^^^^^^^^^^ lifetime `'a` required
--> $DIR/issue-40288-2.rs:32:9
|
LL | fn lifetime_transmute_struct<'a, T: ?Sized>(x: &'a T, y: &T) -> &'a T {
- | -- help: consider changing the type of `y` to : `&'a T`
+ | -- help: add explicit lifetime `'a` to the type of `y`: `&'a T`
...
LL | dst.head = y;
| ^^^^^^^^^^^^ lifetime `'a` required