rust/src/test/compile-fail/liveness-init-in-fn-expr.rs

8 lines
158 B
Rust
Raw Normal View History

fn main() {
let f = fn@() -> int {
let i: int;
ret i; //! ERROR use of possibly uninitialized variable: `i`
};
log(error, f());
}