9f1444c701
Implement "claim" (issue #14), which is a version of "check" that doesn't really do the check at runtime. It's an unsafe feature. The new flag --check-claims turns claims into checks automatically -- but it's off by default, so by default, the assertion in a claim doesn't execute at runtime.
15 lines
232 B
Rust
15 lines
232 B
Rust
// xfail-stage0
|
|
// tests that the pred in a claim isn't actually eval'd
|
|
use std;
|
|
import std::str::*;
|
|
import std::uint::*;
|
|
|
|
pred fails(uint a) -> bool {
|
|
fail;
|
|
}
|
|
|
|
fn main() {
|
|
let uint a = 5u;
|
|
let uint b = 4u;
|
|
claim fails(b);
|
|
} |