```
error[E0621]: explicit lifetime required in the type of `x`
--> $DIR/42701_one_named_and_one_anonymous.rs:10:9
|
LL | &*x
| ^^^ lifetime `'a` required
|
help: add explicit lifetime `'a` to the type of `x`
|
LL | fn foo2<'a>(a: &'a Foo, x: &'a i32) -> &'a i32 {
| ++
```
25 lines
835 B
Text
25 lines
835 B
Text
error[E0621]: explicit lifetime required in the type of `y`
|
|
--> $DIR/issue-40288-2.rs:9:5
|
|
|
|
|
LL | out[0]
|
|
| ^^^^^^ lifetime `'a` required
|
|
|
|
|
help: add explicit lifetime `'a` to the type of `y`
|
|
|
|
|
LL | fn lifetime_transmute_slice<'a, T: ?Sized>(x: &'a T, y: &'a T) -> &'a T {
|
|
| ++
|
|
|
|
error[E0621]: explicit lifetime required in the type of `y`
|
|
--> $DIR/issue-40288-2.rs:24:5
|
|
|
|
|
LL | out.head
|
|
| ^^^^^^^^ lifetime `'a` required
|
|
|
|
|
help: add explicit lifetime `'a` to the type of `y`
|
|
|
|
|
LL | fn lifetime_transmute_struct<'a, T: ?Sized>(x: &'a T, y: &'a T) -> &'a T {
|
|
| ++
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0621`.
|