rust/tests/ui/issues/issue-40288-2.stderr

22 lines
833 B
Plaintext
Raw Normal View History

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