]>
git.proxmox.com Git - rustc.git/blob - tests/ui/regions/regions-infer-call-2.rs
3 fn takes_two(x
: &isize, y
: &isize) -> isize { *x + *y }
5 fn with
<T
, F
>(f
: F
) -> T
where F
: FnOnce(&isize) -> T
{
9 fn has_one
<'a
>(x
: &'a
isize) -> isize {
10 with(|y
| takes_two(x
, y
))
14 assert_eq
!(has_one(&2), 22);