summary refs log tree commit diff
path: root/src/test/compile-fail/block-deinitializes-upvar.rs
blob: 65367a01a7b70251810172b734f60a89b1b51951 (plain)
1
2
3
4
5
6
7
8
// error-pattern:Tried to deinitialize a variable declared in a different
fn force(f: block()) { f(); }
fn main() {
    let x = @{x: 17, y: 2};
    let y = @{x: 5, y: 5};

    force({|| x <- y;});
}