blob: 0eb8afbb26b672f1bdcc215f7ec2bb488d4bcf1d [file] [log] [blame]
error[E0623]: lifetime mismatch
--> $DIR/ex1-return-one-existing-name-if-else-using-impl.rs:21: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 } //~ ERROR lifetime mismatch
| ^ ...but data from `x` is returned here
error: aborting due to previous error
For more information about this error, try `rustc --explain E0623`.