aboutsummaryrefslogtreecommitdiff
path: root/src/test/compile-fail/use-uninit-3.rs
blob: 5dd3926ba0dfc440bb6f311ee9521b45a48e66b1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// xfail-stage0
// error-pattern:Unsatisfied precondition

fn foo(int x) {
  log x;
}

fn main() {
  let int x;
  if (1 > 2) {
    log "whoops";
  } else {
    x = 10;
  }
  foo(x);
}