summary refs log tree commit diff
path: root/src/test/compile-fail/block-coerce-no-2.rs
blob: 0ef325aadd3ab39e4f585eb7401136b20bf56d4d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// Make sure that fn-to-block coercion isn't incorrectly lifted over
// other tycons.

fn main() {
    fn f(f: native fn(native fn(native fn()))) {
    }

    fn g(f: native fn(fn())) {
    }

    f(g);
    //!^ ERROR mismatched types: expected `native fn(native fn(native fn()))`
}