summaryrefslogtreecommitdiffstats
path: root/tests/ui/nll/where_clauses_in_functions.rs
blob: 826065d02907525d9003bb83101e3e775a6c9290 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#![allow(dead_code)]

fn foo<'a, 'b>(x: &'a u32, y: &'b u32) -> (&'a u32, &'b u32)
where
    'a: 'b,
{
    (x, y)
}

fn bar<'a, 'b>(x: &'a u32, y: &'b u32) -> (&'a u32, &'b u32) {
    foo(x, y)
    //~^ ERROR lifetime may not live long enough
}

fn main() {}