2019-10-03 22:14:48 -05:00
|
|
|
error: `impl` item signature doesn't match `trait` item signature
|
2019-10-03 13:41:27 -05:00
|
|
|
--> $DIR/lifetime-mismatch-between-trait-and-impl.rs:6:5
|
|
|
|
|
|
2019-10-15 12:36:26 -05:00
|
|
|
LL | fn foo<'a>(x: &i32, y: &'a i32) -> &'a i32;
|
2021-10-01 00:47:41 -05:00
|
|
|
| ------------------------------------------- expected `fn(&'1 i32, &'a i32) -> &'a i32`
|
2019-10-15 12:36:26 -05:00
|
|
|
...
|
2019-10-03 13:41:27 -05:00
|
|
|
LL | fn foo<'a>(x: &'a i32, y: &'a i32) -> &'a i32 {
|
2021-10-01 00:47:41 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ found `fn(&'1 i32, &'1 i32) -> &'1 i32`
|
2019-10-03 13:41:27 -05:00
|
|
|
|
|
2022-12-24 17:17:25 -06:00
|
|
|
= note: expected signature `fn(&'1 i32, &'a i32) -> &'a i32`
|
|
|
|
found signature `fn(&'1 i32, &'1 i32) -> &'1 i32`
|
2020-05-27 22:58:05 -05:00
|
|
|
= help: the lifetime requirements from the `impl` do not correspond to the requirements in the `trait`
|
2019-12-22 15:53:01 -06:00
|
|
|
= help: verify the lifetime relationships in the `trait` and `impl` between the `self` argument, the other inputs and its output
|
2019-10-03 13:41:27 -05:00
|
|
|
|
2023-11-21 09:44:16 -06:00
|
|
|
error: aborting due to 1 previous error
|
2019-10-03 13:41:27 -05:00
|
|
|
|