summary refs log tree commit diff
path: root/src/test/compile-fail/block-deinitializes-upvar.rs
blob: f8434dfd9f9d0227ed808630dffa9bb9bd19aa78 (plain)
1
2
3
4
5
6
7
8
// 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;});
}