aboutsummaryrefslogtreecommitdiff
path: root/src/test/compile-fail/use-uninit-3.rs
blob: 9628d4f9c23d743df4c8a129f5ebd1962725a012 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// 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);
}