2012-03-05 16:27:27 -08:00
|
|
|
// error-pattern:upvars (like 'x') cannot be moved into a closure
|
2011-12-19 12:50:31 -08:00
|
|
|
fn main() {
|
|
|
|
let x = 5;
|
2012-01-12 15:38:44 -08:00
|
|
|
let _y = fn~[move x]() -> int {
|
|
|
|
let _z = fn~[move x]() -> int { x };
|
2011-12-19 12:50:31 -08:00
|
|
|
22
|
|
|
|
};
|
|
|
|
}
|