rust/src/test/compile-fail/do-while-pred-constraints.rs

15 lines
349 B
Rust

// error-pattern: Unsatisfied precondition constraint (for example, even(y
fn print_even(y: int) : even(y) { log(debug, y); }
pure fn even(y: int) -> bool { true }
fn main() {
let y: int = 42;
check (even(y));
do {
print_even(y);
do { do { do { y += 1; } while false } while false } while false
} while true
}