2012-04-30 10:37:58 -07: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 12:23:59 +01:00
|
|
|
let mut x; //~ ERROR foo
|
2012-04-30 10:37:58 -07:00
|
|
|
|
|
|
|
if cond {
|
2012-06-29 16:26:56 -07:00
|
|
|
x = &[1,2,3]blk;
|
2012-04-30 10:37:58 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|