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

8 lines
164 B
Rust

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