rust/src/test/compile-fail/block-coerce-no-2.rs

14 lines
283 B
Rust
Raw Normal View History

// 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()))`
}