15 lines
195 B
Rust
15 lines
195 B
Rust
// -*- rust -*-
|
|
|
|
fn g() { }
|
|
|
|
pure fn f(_q: int) -> bool {
|
|
g(); //! ERROR access to impure function prohibited in pure context
|
|
ret true;
|
|
}
|
|
|
|
fn main() {
|
|
let x = 0;
|
|
|
|
check (f(x));
|
|
}
|