blob: 56ca610019c4cb83e804b60f9c0f42e483acc389 [file] [log] [blame]
error[E0623]: lifetime mismatch
--> $DIR/ex1-return-one-existing-name-if-else-using-impl.rs:11:20
|
LL | fn foo<'a>(x: &i32, y: &'a i32) -> &'a i32 {
| ---- -------
| |
| this parameter and the return type are declared with different lifetimes...
LL |
LL | if x > y { x } else { y }
| ^ ...but data from `x` is returned here
error: aborting due to previous error