rust/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-nam...

6 lines
125 B
Rust

fn foo<'a>((x, y): (&'a i32, &i32)) -> &'a i32 {
if x > y { x } else { y } //~ ERROR explicit lifetime
}
fn main () { }