summaryrefslogtreecommitdiffstats
path: root/tests/ui/fn/fun-call-variants.rs
blob: 5b83e2620d8442f3bccfb9bb2d692725df1136f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// run-pass

fn ho<F>(f: F) -> isize where F: FnOnce(isize) -> isize { let n: isize = f(3); return n; }

fn direct(x: isize) -> isize { return x + 1; }

pub fn main() {
    let a: isize = direct(3); // direct
    let b: isize = ho(direct); // indirect unbound

    assert_eq!(a, b);
}