blob: bc302e91c1c518f0b0075ea0d4646c083796a79a [file] [log] [blame]
error: `impl` item signature doesn't match `trait` item signature
--> $DIR/mismatched_trait_impl.rs:9:5
|
LL | fn foo(&self, x: &'a u32, y: &u32) -> &'a u32;
| ---------------------------------------------- expected fn(&i32, &'a u32, &u32) -> &'a u32
...
LL | fn foo(&self, x: &u32, y: &'a u32) -> &'a u32 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ found fn(&i32, &u32, &u32) -> &u32
|
= note: expected `fn(&i32, &'a u32, &u32) -> &'a u32`
found `fn(&i32, &u32, &u32) -> &u32`
error[E0623]: lifetime mismatch
--> $DIR/mismatched_trait_impl.rs:10:9
|
LL | fn foo(&self, x: &u32, y: &'a u32) -> &'a u32 {
| ---- -------
| |
| this parameter and the return type are declared with different lifetimes...
LL | x
| ^ ...but data from `x` is returned here
error: aborting due to 2 previous errors