blob: e9f5fc311dfc236e2cdc752097169d4695472580 [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
For more information about this error, try `rustc --explain E0623`.