| warning: not reporting region error due to nll |
| --> $DIR/ex1-return-one-existing-name-if-else-using-impl.rs:21:20 |
| | |
| LL | if x > y { x } else { y } //~ ERROR lifetime mismatch |
| | ^ |
| |
| error: unsatisfied lifetime constraints |
| --> $DIR/ex1-return-one-existing-name-if-else-using-impl.rs:21:12 |
| | |
| LL | fn foo<'a>(x: &i32, y: &'a i32) -> &'a i32 { |
| | -- - let's call the lifetime of this reference `'1` |
| | | |
| | lifetime `'a` defined here |
| LL | |
| LL | if x > y { x } else { y } //~ ERROR lifetime mismatch |
| | ^^^^^ requires that `'1` must outlive `'a` |
| |
| error: aborting due to previous error |
| |