aboutsummaryrefslogtreecommitdiff
path: root/src/test/compile-fail/impure-pred.rs
blob: b5ebc10e72f2ebcc34d755dab5ee805b9047bb83 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// -*- rust -*-
// xfail-boot
// xfail-stage0
// error-pattern: impure function

fn g() -> () {}

pred f(int q) -> bool { 
  g();
  ret true;
}

fn main() {
  auto x = 0;

  check f(x); 
}