2012-04-30 12:37:58 -05:00
|
|
|
// xfail-test
|
|
|
|
|
|
|
|
fn foo(cond: bool) {
|
|
|
|
// Here we will infer a type that uses the
|
|
|
|
// region of the if stmt then block, but in the scope:
|
2012-06-30 06:23:59 -05:00
|
|
|
let mut x; //~ ERROR foo
|
2012-04-30 12:37:58 -05:00
|
|
|
|
|
|
|
if cond {
|
2012-06-29 18:26:56 -05:00
|
|
|
x = &[1,2,3]blk;
|
2012-04-30 12:37:58 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|