aboutsummaryrefslogtreecommitdiff
path: root/src/comp/front
diff options
context:
space:
mode:
authorPatrick Walton <[email protected]>2011-03-31 19:12:40 -0700
committerPatrick Walton <[email protected]>2011-03-31 19:12:40 -0700
commitc66edca83d04c5be5c27629b43c2c180a67f2d63 (patch)
tree37db28b65567fd8c067c82d1917878181a69c0f5 /src/comp/front
parentrustc: Make tag_ty_params() and substitute_ty_params() take def ids instead o... (diff)
downloadrust-c66edca83d04c5be5c27629b43c2c180a67f2d63.tar.xz
rust-c66edca83d04c5be5c27629b43c2c180a67f2d63.zip
rustc: Add a type annotation to tag items
Diffstat (limited to 'src/comp/front')
-rw-r--r--src/comp/front/ast.rs6
-rw-r--r--src/comp/front/parser.rs3
2 files changed, 5 insertions, 4 deletions
diff --git a/src/comp/front/ast.rs b/src/comp/front/ast.rs
index fae90392..0bd18382 100644
--- a/src/comp/front/ast.rs
+++ b/src/comp/front/ast.rs
@@ -404,7 +404,7 @@ tag item_ {
item_mod(ident, _mod, def_id);
item_native_mod(ident, native_mod, def_id);
item_ty(ident, @ty, vec[ty_param], def_id, ann);
- item_tag(ident, vec[variant], vec[ty_param], def_id);
+ item_tag(ident, vec[variant], vec[ty_param], def_id, ann);
item_obj(ident, _obj, vec[ty_param], obj_def_ids, ann);
}
@@ -448,7 +448,7 @@ fn index_item(mod_index index, @item it) {
case (ast.item_ty(?id, _, _, _, _)) {
index.insert(id, ast.mie_item(it));
}
- case (ast.item_tag(?id, ?variants, _, _)) {
+ case (ast.item_tag(?id, ?variants, _, _, _)) {
index.insert(id, ast.mie_item(it));
let uint variant_idx = 0u;
for (ast.variant v in variants) {
@@ -505,7 +505,7 @@ fn index_stmt(block_index index, @stmt s) {
case (ast.item_ty(?i, _, _, _, _)) {
index.insert(i, ast.bie_item(it));
}
- case (ast.item_tag(?i, ?variants, _, _)) {
+ case (ast.item_tag(?i, ?variants, _, _, _)) {
index.insert(i, ast.bie_item(it));
let uint vid = 0u;
for (ast.variant v in variants) {
diff --git a/src/comp/front/parser.rs b/src/comp/front/parser.rs
index e0324f77..f7d355a4 100644
--- a/src/comp/front/parser.rs
+++ b/src/comp/front/parser.rs
@@ -2071,7 +2071,8 @@ impure fn parse_item_tag(parser p) -> @ast.item {
p.bump();
auto hi = p.get_span();
- auto item = ast.item_tag(id, variants, ty_params, p.next_def_id());
+ auto item = ast.item_tag(id, variants, ty_params, p.next_def_id(),
+ ast.ann_none);
ret @spanned(lo, hi, item);
}