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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
833 B
Plaintext
Raw Normal View History

2018-07-15 16:11:54 -05:00
error[E0621]: explicit lifetime required in the type of `y`
2018-12-25 09:56:47 -06:00
--> $DIR/issue-40288-2.rs:9:5
2018-07-15 16:11:54 -05:00
|
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`
2018-12-25 09:56:47 -06:00
--> $DIR/issue-40288-2.rs:24:5
2018-07-15 16:11:54 -05:00
|
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`.