rust/src/test/compile-fail/cap-clause-move-upvar.rs

8 lines
190 B
Rust
Raw Normal View History

fn main() {
let x = 5;
2012-05-04 14:33:04 -05:00
let _y = fn~(move x) -> int {
let _z = fn~(move x) -> int { x }; //~ ERROR moving out of captured outer variable in a heap closure
22
};
}