rust/src/test/compile-fail/fn-bare-bind.rs

10 lines
172 B
Rust
Raw Normal View History

// error-pattern:mismatched types: expected `fn()` but found `fn@()`
2011-10-20 22:34:04 -05:00
fn f() {
}
fn main() {
// Can't produce a bare function by binding
2011-10-20 22:34:04 -05:00
let g: fn() = bind f();
}