summary refs log tree commit diff
path: root/src/test/compile-fail/missing-do.rs
blob: c9fe0faab8a6daa7b7c2667fe8509b82e9a6c92d (plain)
1
2
3
4
5
6
7
8
9
// Regression test for issue #2783

fn foo(f: fn()) { f() }

fn main() {
    ~"" || 42; //~ ERROR binary operation || cannot be applied to type `~str`
    foo || {}; //~ ERROR binary operation || cannot be applied to type `fn(fn&())`
    //~^ NOTE did you forget the 'do' keyword for the call?
}