rust/src/test/compile-fail/block-deinitializes-upvar.rs
2012-01-23 19:06:33 -08:00

9 lines
196 B
Rust

// error-pattern:Tried to deinitialize a variable declared in a different
fn force(f: fn()) { f(); }
fn main() {
let x = @{x: 17, y: 2};
let y = @{x: 5, y: 5};
force({|| x <- y;});
}