rust/src/test/compile-fail/not-a-pred-check.rs

11 lines
147 B
Rust
Raw Normal View History

2011-05-04 11:32:06 -07:00
// -*- rust -*-
2011-08-24 17:24:58 -07:00
// error-pattern: Impure function as operator
2011-05-04 11:32:06 -07:00
2011-07-27 14:19:39 +02:00
fn f(q: int) -> bool { ret true; }
2011-05-04 11:32:06 -07:00
fn main() {
2011-07-27 14:19:39 +02:00
let x = 0;
2011-05-04 11:32:06 -07:00
2011-07-27 14:19:39 +02:00
check (f(x));
}