2012-05-19 07:52:01 -05:00
|
|
|
fn foo() -> int {
|
|
|
|
let x: int;
|
|
|
|
|
|
|
|
loop {
|
|
|
|
break;
|
2012-06-30 06:23:59 -05:00
|
|
|
x = 0; //~ WARNING unreachable statement
|
2012-05-19 07:52:01 -05:00
|
|
|
}
|
|
|
|
|
2012-06-30 06:23:59 -05:00
|
|
|
log(debug, x); //~ ERROR use of possibly uninitialized variable: `x`
|
2012-05-19 07:52:01 -05:00
|
|
|
|
2012-08-01 19:30:05 -05:00
|
|
|
return 17;
|
2012-05-19 07:52:01 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() { log(debug, foo()); }
|