aboutsummaryrefslogtreecommitdiff
path: root/src/test/compile-fail/break-uninit.rs
blob: 097312b2b6408445a9c71bf6f3a4059ed5ab98f7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// xfail-boot
// error-pattern:Unsatisfied precondition

fn foo() -> int {
  let int x;
  let int i;

  do {
    i = 0;
    break;
    x = 0;
  } while ((x = 0) != 0);

  log(x);

  ret 17;
}

fn main() {
  log(foo());
}