rust/src/test/compile-fail/borrowck-move-by-capture.rs
2013-11-26 08:25:27 -08:00

9 lines
279 B
Rust

pub fn main() {
// FIXME(#2202) - Due to the way that borrowck treats closures,
// you get two error reports here.
let bar = ~3;
let _g = || { //~ ERROR capture of moved value
let _h: proc() -> int = proc() *bar; //~ ERROR capture of moved value
};
}