about summary refs log tree commit diff
path: root/tests/ui/inference/fnonce-closure-call.rs
blob: 262a193609fc9e98db9d08c2fc10250b804b3c6d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
//! Regression test for https://github.com/rust-lang/rust/issues/10718

//@ run-pass

fn f<F:FnOnce()>(p: F) {
    p();
}

pub fn main() {
    let p = || ();
    f(p);
}