rust/src/test/compile-fail/missing-do.rs

10 lines
302 B
Rust
Raw Normal View History

// Regression test for issue #2783
fn foo(f: fn()) { f() }
fn main() {
2012-07-11 21:31:15 -05:00
"" || 42; //~ ERROR binary operation || cannot be applied to type `str/~`
foo || {}; //~ ERROR binary operation || cannot be applied to type `extern fn(fn())`
//~^ NOTE did you forget the 'do' keyword for the call?
}