summaryrefslogtreecommitdiffstats
path: root/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-2.rs
blob: 9b15b378dc1852b16f386783daa71b153c57491b (plain)
1
2
3
4
5
fn foo<'a>(x: &i32, y: &'a i32) -> &'a i32 {
    if x > y { x } else { y } //~ ERROR explicit lifetime
}

fn main() { }