librustc: Implement the proc type as sugar for ~once fn and proc

notation for closures, and disable the feature gate for `once fn` if
used with the `~` sigil.
This commit is contained in:
Patrick Walton
2013-10-28 15:22:49 -07:00
parent e6650c87a3
commit 7e77bf1769
29 changed files with 250 additions and 70 deletions

View File

@@ -786,6 +786,9 @@ pub fn noop_fold_expr<T:ast_fold>(e: @ast::Expr, folder: &T) -> @ast::Expr {
folder.fold_block(body)
)
}
ExprProc(ref decl, ref body) => {
ExprProc(fold_fn_decl(decl, folder), folder.fold_block(body))
}
ExprBlock(ref blk) => ExprBlock(folder.fold_block(blk)),
ExprAssign(el, er) => {
ExprAssign(folder.fold_expr(el), folder.fold_expr(er))