Fix no_closure builds.

This commit is contained in:
Stephen Chung
2021-03-29 13:07:10 +08:00
parent c0b2eee9f2
commit fc6c5ecd00
4 changed files with 9 additions and 8 deletions

View File

@@ -2800,7 +2800,7 @@ fn make_curry_from_externals(
// Convert the entire expression into a statement block, then insert the relevant
// [`Share`][Stmt::Share] statements.
let mut statements: StaticVec<_> = Default::default();
statements.extend(externals.into_iter().map(Stmt::Share));
statements.extend(externals.into_iter().map(|v| Stmt::Share(Box::new(v))));
statements.push(Stmt::Expr(expr));
Expr::Stmt(Box::new(StmtBlock { statements, pos }))
}