rust/src/test/compile-fail/liveness-block-unint.rs

8 lines
164 B
Rust
Raw Normal View History

fn force(f: fn()) { f(); }
fn main() {
let x: int;
force(fn&() {
log(debug, x); //~ ERROR capture of possibly uninitialized variable: `x`
});
}