about summary refs log tree commit diff
path: root/src/test/compile-fail/while-bypass.rs
blob: b49152b3e98cb390d4f705fcd55671f7b5f8a21a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// xfail-stage0
// error-pattern: precondition constraint

fn f() -> int {
  let int x;
  while(true) {
    x = 10;
  }
  ret x;
}

fn main() {
  f();
}