rust/src/test/compile-fail/impure-pred.rs

16 lines
159 B
Rust
Raw Normal View History

2011-05-04 13:32:06 -05:00
// -*- rust -*-
// error-pattern: impure function
fn g() -> () {}
pred f(int q) -> bool {
g();
ret true;
}
fn main() {
auto x = 0;
check f(x);
}