rust/src/test/compile-fail/impure-pred.rs
2011-07-27 15:54:33 +02:00

12 lines
187 B
Rust

// -*- rust -*-
// error-pattern: Pure function calls function not known to be pure
fn g() { }
pred f(q: int) -> bool { g(); ret true; }
fn main() {
let x = 0;
check (f(x));
}