2012-12-10 17:32:48 -08:00
|
|
|
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
|
|
|
|
// file at the top-level directory of this distribution and at
|
|
|
|
// http://rust-lang.org/COPYRIGHT.
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
|
|
|
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
|
|
|
// option. This file may not be copied, modified, or distributed
|
|
|
|
// except according to those terms.
|
|
|
|
|
2012-07-03 01:32:05 +01:00
|
|
|
// Regression test for issue #2783
|
|
|
|
|
2013-03-07 14:38:38 -08:00
|
|
|
fn foo(f: &fn()) { f() }
|
2012-07-03 01:32:05 +01:00
|
|
|
|
|
|
|
fn main() {
|
2012-07-14 13:55:41 -07:00
|
|
|
~"" || 42; //~ ERROR binary operation || cannot be applied to type `~str`
|
2013-03-13 22:25:28 -04:00
|
|
|
foo || {}; //~ ERROR binary operation || cannot be applied to type `extern "Rust" fn(&fn())`
|
2013-01-23 20:27:12 -08:00
|
|
|
//~^ NOTE did you forget the `do` keyword for the call?
|
2012-07-03 01:32:05 +01:00
|
|
|
}
|