summary refs log tree commit diff
path: root/src/test/compile-fail/impure-pred.rs
blob: 4b7faaa0280e95d3f66ce6a93df6d5bd9e0ebbdb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// -*- rust -*-
// error-pattern: pure function calls function not known to be pure

fn g() { }

pure fn f(q: int) -> bool { g(); ret true; }

fn main() {
    let x = 0;

    check (f(x));
}