summaryrefslogtreecommitdiffstats
path: root/tests/run-make-fulldeps/issue-20626/foo.rs
blob: a474e234e72d0b5b83cdd340bd8071867f3b5651 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
fn identity(a: &u32) -> &u32 { a }

fn print_foo(f: &fn(&u32) -> &u32, x: &u32) {
    print!("{}", (*f)(x));
}

fn main() {
    let x = &4;
    let f: fn(&u32) -> &u32 = identity;

    // Didn't print 4 on optimized builds
    print_foo(&f, x);
}