summary refs log tree commit diff
path: root/src/test/run-pass/fn-bare-bind.rs
blob: 064e6430f8ad31a88cd0efd7a10c86d1a121650a (plain)
1
2
3
4
5
6
7
8
9
fn f(i: int) {
    assert i == 10;
}

fn main() {
    // Binding a bare function turns it into a shared closure
    let g: fn@() = bind f(10);
    g();
}