blob: cfcf2bffb34476b02a2dde2d9298f5335c006218 (
plain)
1
2
3
4
5
6
7
8
|
// error-pattern:moving out of captured outer immutable variable in a stack closure
fn force(f: fn()) { f(); }
fn main() {
let mut x = @{x: 17, y: 2};
let y = @{x: 5, y: 5};
force(|| x <- y );
}
|