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

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

fn main() {
  f();
}