16 lines
159 B
Rust
16 lines
159 B
Rust
|
// -*- rust -*-
|
||
|
// error-pattern: impure function
|
||
|
|
||
|
fn g() -> () {}
|
||
|
|
||
|
pred f(int q) -> bool {
|
||
|
g();
|
||
|
ret true;
|
||
|
}
|
||
|
|
||
|
fn main() {
|
||
|
auto x = 0;
|
||
|
|
||
|
check f(x);
|
||
|
}
|