We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5bd9d6e commit 1f80b9bCopy full SHA for 1f80b9b
src/test/compile-fail/missing-do.rs
@@ -0,0 +1,9 @@
1
+// Regression test for issue #2783
2
+
3
+fn foo(f: fn()) { f() }
4
5
+fn main() {
6
+ "" || 42; //! ERROR binary operation || cannot be applied to type `str`
7
+ foo || {}; //! ERROR binary operation || cannot be applied to type `extern fn(fn())`
8
+ //!^ NOTE did you forget the 'do' keyword for the call?
9
+}
0 commit comments