aboutsummaryrefslogtreecommitdiff
path: root/src/comp/middle/resolve.rs
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/middle/resolve.rs
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/middle/resolve.rs')
-rw-r--r--src/comp/middle/resolve.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/comp/middle/resolve.rs b/src/comp/middle/resolve.rs
index 39c4294d..20e60971 100644
--- a/src/comp/middle/resolve.rs
+++ b/src/comp/middle/resolve.rs
@@ -319,7 +319,7 @@ fn lookup_name_wrapped(&env e, ast.ident i, namespace ns)
case (ast.item_ty(_, _, _, ?id, _)) {
ret def_wrap_other(ast.def_ty(id));
}
- case (ast.item_tag(_, _, _, ?id)) {
+ case (ast.item_tag(_, _, _, ?id, _)) {
ret def_wrap_other(ast.def_ty(id));
}
case (ast.item_obj(_, _, _, ?odid, _)) {
@@ -388,7 +388,7 @@ fn lookup_name_wrapped(&env e, ast.ident i, namespace ns)
}
case (ast.mie_tag_variant(?item, ?variant_idx)) {
alt (item.node) {
- case (ast.item_tag(_, ?variants, _, ?tid)) {
+ case (ast.item_tag(_, ?variants, _, ?tid, _)) {
auto vid = variants.(variant_idx).node.id;
auto t = ast.def_variant(tid, vid);
ret some[def_wrap](def_wrap_other(t));
@@ -445,7 +445,7 @@ fn lookup_name_wrapped(&env e, ast.ident i, namespace ns)
fn found_tag(@ast.item item, uint variant_idx) -> def_wrap {
alt (item.node) {
- case (ast.item_tag(_, ?variants, _, ?tid)) {
+ case (ast.item_tag(_, ?variants, _, ?tid, _)) {
auto vid = variants.(variant_idx).node.id;
auto t = ast.def_variant(tid, vid);
ret def_wrap_other(t);
@@ -505,7 +505,7 @@ fn lookup_name_wrapped(&env e, ast.ident i, namespace ns)
}
}
}
- case (ast.item_tag(_, ?variants, ?ty_params, ?tag_id)) {
+ case (ast.item_tag(_,?variants,?ty_params,?tag_id,_)) {
for (ast.ty_param tp in ty_params) {
if (_str.eq(tp.ident, i)) {
auto t = ast.def_ty_arg(tp.id);