rust/src/test/compile-fail/cap-clause-move-upvar.rs
2012-05-04 12:33:08 -07:00

8 lines
154 B
Rust

fn main() {
let x = 5;
let _y = fn~(move x) -> int {
let _z = fn~(move x) -> int { x }; //! ERROR moving out of upvar
22
};
}