2018-07-15 16:11:54 -05:00
|
|
|
error[E0621]: explicit lifetime required in the type of `y`
|
|
|
|
--> $DIR/issue-40288-2.rs:19:5
|
|
|
|
|
|
|
|
|
LL | fn lifetime_transmute_slice<'a, T: ?Sized>(x: &'a T, y: &T) -> &'a T {
|
2018-08-06 12:56:24 -05:00
|
|
|
| -- help: add explicit lifetime `'a` to the type of `y`: `&'a T`
|
2018-07-15 16:11:54 -05:00
|
|
|
...
|
|
|
|
LL | out[0]
|
|
|
|
| ^^^^^^ lifetime `'a` required
|
|
|
|
|
|
|
|
error[E0621]: explicit lifetime required in the type of `y`
|
|
|
|
--> $DIR/issue-40288-2.rs:34:5
|
|
|
|
|
|
|
|
|
LL | fn lifetime_transmute_struct<'a, T: ?Sized>(x: &'a T, y: &T) -> &'a T {
|
2018-08-06 12:56:24 -05:00
|
|
|
| -- help: add explicit lifetime `'a` to the type of `y`: `&'a T`
|
2018-07-15 16:11:54 -05:00
|
|
|
...
|
|
|
|
LL | out.head
|
|
|
|
| ^^^^^^^^ lifetime `'a` required
|
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0621`.
|