rustc: Support irrefutable patterns in function arguments. r=nmatsakis

This commit is contained in:
Patrick Walton
2012-11-06 18:41:06 -08:00
parent b223c9c465
commit 0fc952372a
31 changed files with 392 additions and 159 deletions

View File

@@ -105,9 +105,9 @@ fn fold_attribute_(at: attribute, fld: ast_fold) ->
//used in noop_fold_foreign_item and noop_fold_fn_decl
fn fold_arg_(a: arg, fld: ast_fold) -> arg {
return {mode: a.mode,
ty: fld.fold_ty(a.ty),
ident: fld.fold_ident(a.ident),
id: fld.new_id(a.id)};
ty: fld.fold_ty(a.ty),
pat: fld.fold_pat(a.pat),
id: fld.new_id(a.id)};
}
//used in noop_fold_expr, and possibly elsewhere in the future
fn fold_mac_(m: mac, fld: ast_fold) -> mac {