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