rust/src/test/compile-fail/liveness-break-uninit.rs
Gareth Daniel Smith 6d86969260 change the test suite //! kind syntax to //~ kind in order to avoid a
conflict with the new single-line-sugared-inner-doc-comment (`//! ...`).
2012-06-30 12:23:59 +01:00

15 lines
240 B
Rust

fn foo() -> int {
let x: int;
loop {
break;
x = 0; //~ WARNING unreachable statement
}
log(debug, x); //~ ERROR use of possibly uninitialized variable: `x`
ret 17;
}
fn main() { log(debug, foo()); }