about summary refs log tree commit diff
path: root/tests/ui/regions/regions-infer-call.rs
blob: ad48f3aa93a3654b4eaa579fb24cead7fa9f6ec0 (plain)
1
2
3
4
5
6
7
8
9
10
11
//@ run-pass

fn takes_two(x: &isize, y: &isize) -> isize { *x + *y }

fn has_two<'a,'b>(x: &'a isize, y: &'b isize) -> isize {
    takes_two(x, y)
}

pub fn main() {
    assert_eq!(has_two(&20, &2), 22);
}