diff options
| author | Patrick Walton <[email protected]> | 2011-03-31 19:12:40 -0700 |
|---|---|---|
| committer | Patrick Walton <[email protected]> | 2011-03-31 19:12:40 -0700 |
| commit | c66edca83d04c5be5c27629b43c2c180a67f2d63 (patch) | |
| tree | 37db28b65567fd8c067c82d1917878181a69c0f5 /src/comp/middle/fold.rs | |
| parent | rustc: Make tag_ty_params() and substitute_ty_params() take def ids instead o... (diff) | |
| download | rust-c66edca83d04c5be5c27629b43c2c180a67f2d63.tar.xz rust-c66edca83d04c5be5c27629b43c2c180a67f2d63.zip | |
rustc: Add a type annotation to tag items
Diffstat (limited to 'src/comp/middle/fold.rs')
| -rw-r--r-- | src/comp/middle/fold.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/comp/middle/fold.rs b/src/comp/middle/fold.rs index 0c25052c..8138d1a3 100644 --- a/src/comp/middle/fold.rs +++ b/src/comp/middle/fold.rs @@ -269,7 +269,7 @@ type ast_fold[ENV] = (fn(&ENV e, &span sp, ident ident, vec[ast.variant] variants, vec[ast.ty_param] ty_params, - def_id id) -> @item) fold_item_tag, + def_id id, ann a) -> @item) fold_item_tag, (fn(&ENV e, &span sp, ident ident, &ast._obj ob, @@ -971,7 +971,7 @@ fn fold_item[ENV](&ENV env, ast_fold[ENV] fld, @item i) -> @item { ret fld.fold_item_ty(env_, i.span, ident, ty_, params, id, ann); } - case (ast.item_tag(?ident, ?variants, ?ty_params, ?id)) { + case (ast.item_tag(?ident, ?variants, ?ty_params, ?id, ?ann)) { let vec[ast.variant] new_variants = vec(); for (ast.variant v in variants) { let vec[ast.variant_arg] new_args = vec(); @@ -984,7 +984,7 @@ fn fold_item[ENV](&ENV env, ast_fold[ENV] fld, @item i) -> @item { new_variants += vec(respan[ast.variant_](v.span, new_v)); } ret fld.fold_item_tag(env_, i.span, ident, new_variants, - ty_params, id); + ty_params, id, ann); } case (ast.item_obj(?ident, ?ob, ?tps, ?odid, ?ann)) { @@ -1440,8 +1440,8 @@ fn identity_fold_native_item_ty[ENV](&ENV e, &span sp, ident i, fn identity_fold_item_tag[ENV](&ENV e, &span sp, ident i, vec[ast.variant] variants, vec[ast.ty_param] ty_params, - def_id id) -> @item { - ret @respan(sp, ast.item_tag(i, variants, ty_params, id)); + def_id id, ann a) -> @item { + ret @respan(sp, ast.item_tag(i, variants, ty_params, id, a)); } fn identity_fold_item_obj[ENV](&ENV e, &span sp, ident i, @@ -1654,7 +1654,7 @@ fn new_identity_fold[ENV]() -> ast_fold[ENV] { fold_item_ty = bind identity_fold_item_ty[ENV](_,_,_,_,_,_,_), fold_native_item_ty = bind identity_fold_native_item_ty[ENV](_,_,_,_), - fold_item_tag = bind identity_fold_item_tag[ENV](_,_,_,_,_,_), + fold_item_tag = bind identity_fold_item_tag[ENV](_,_,_,_,_,_,_), fold_item_obj = bind identity_fold_item_obj[ENV](_,_,_,_,_,_,_), fold_view_item_use = |