blob: b68b90e77dee5e97576e03e778d89db77e838c9b [file] [log] [blame]
error[E0621]: explicit lifetime required in the type of `y`
--> $DIR/ex1-return-one-existing-name-if-else.rs:12:27
|
LL | fn foo<'a>(x: &'a i32, y: &i32) -> &'a i32 {
| ---- help: add explicit lifetime `'a` to the type of `y`: `&'a i32`
LL | if x > y { x } else { y } //~ ERROR explicit lifetime
| ^ lifetime `'a` required
error: aborting due to previous error
For more information about this error, try `rustc --explain E0621`.