Skip to content

Commit

Permalink
Added testcase for the missing do compile note
Browse files Browse the repository at this point in the history
  • Loading branch information
mitsuhiko authored and brson committed Jul 3, 2012
1 parent 5bd9d6e commit 1f80b9b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/test/compile-fail/missing-do.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,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 `extern fn(fn())`
//!^ NOTE did you forget the 'do' keyword for the call?
}

0 comments on commit 1f80b9b

Please sign in to comment.