about summary refs log tree commit diff
path: root/src/comp/middle
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2011-06-14 17:06:06 -0700
committerBrian Anderson <banderson@mozilla.com>2011-06-15 09:48:55 -0700
commit1c9277e0d313bb4118a44f6533be9af2e868a1d2 (patch)
tree739bce684e7f92b2372b0cb1e969abc0ba7d0c5d /src/comp/middle
parent697fdaac24c0f973da8569b1249d8c778e510082 (diff)
rustc: Make room in remaining AST item nodes for attributes
Issue #487
Diffstat (limited to 'src/comp/middle')
-rw-r--r--src/comp/middle/alias.rs2
-rw-r--r--src/comp/middle/metadata.rs24
-rw-r--r--src/comp/middle/resolve.rs69
-rw-r--r--src/comp/middle/trans.rs30
-rw-r--r--src/comp/middle/tstate/pre_post_conditions.rs12
-rw-r--r--src/comp/middle/ty.rs14
-rw-r--r--src/comp/middle/typeck.rs33
-rw-r--r--src/comp/middle/visit.rs12
-rw-r--r--src/comp/middle/walk.rs12
9 files changed, 105 insertions, 103 deletions
diff --git a/src/comp/middle/alias.rs b/src/comp/middle/alias.rs
index 5f881fb0b18..fde8f62aefb 100644
--- a/src/comp/middle/alias.rs
+++ b/src/comp/middle/alias.rs
@@ -66,7 +66,7 @@ fn visit_fn(@ctx cx, &ast::_fn f, &vec[ast::ty_param] tp, &span sp,
 
 fn visit_item(@ctx cx, &@ast::item i, &scope sc, &vt[scope] v) {
     alt (i.node) {
-        case (ast::item_obj(_, ?o, _, _, _)) {
+        case (ast::item_obj(_, ?o, _, _, _, _)) {
             for (ast::obj_field f in o.fields) {
                 cx.local_map.insert(f.id._1, objfield(f.mut));
             }
diff --git a/src/comp/middle/metadata.rs b/src/comp/middle/metadata.rs
index dbab7dc3a24..471726e3271 100644
--- a/src/comp/middle/metadata.rs
+++ b/src/comp/middle/metadata.rs
@@ -388,14 +388,14 @@ fn encode_module_item_paths(&ebml::writer ebml_w,
         }
 
         alt (it.node) {
-            case (ast::item_const(?id, _, ?tps, ?did, ?ann)) {
+            case (ast::item_const(?id, _, ?tps, _, ?did, ?ann)) {
                 add_to_index(ebml_w, path, index, id);
                 ebml::start_tag(ebml_w, tag_paths_data_item);
                 encode_name(ebml_w, id);
                 encode_def_id(ebml_w, did);
                 ebml::end_tag(ebml_w);
             }
-            case (ast::item_fn(?id, _, ?tps, ?did, ?ann)) {
+            case (ast::item_fn(?id, _, ?tps, _, ?did, ?ann)) {
                 add_to_index(ebml_w, path, index, id);
                 ebml::start_tag(ebml_w, tag_paths_data_item);
                 encode_name(ebml_w, id);
@@ -410,7 +410,7 @@ fn encode_module_item_paths(&ebml::writer ebml_w,
                 encode_module_item_paths(ebml_w, _mod, path + [id], index);
                 ebml::end_tag(ebml_w);
             }
-            case (ast::item_native_mod(?id, ?nmod, ?did)) {
+            case (ast::item_native_mod(?id, ?nmod, _, ?did)) {
                 add_to_index(ebml_w, path, index, id);
                 ebml::start_tag(ebml_w, tag_paths_data_mod);
                 encode_name(ebml_w, id);
@@ -419,14 +419,14 @@ fn encode_module_item_paths(&ebml::writer ebml_w,
                                                 index);
                 ebml::end_tag(ebml_w);
             }
-            case (ast::item_ty(?id, _, ?tps, ?did, ?ann)) {
+            case (ast::item_ty(?id, _, ?tps, _, ?did, ?ann)) {
                 add_to_index(ebml_w, path, index, id);
                 ebml::start_tag(ebml_w, tag_paths_data_item);
                 encode_name(ebml_w, id);
                 encode_def_id(ebml_w, did);
                 ebml::end_tag(ebml_w);
             }
-            case (ast::item_tag(?id, ?variants, ?tps, ?did, _)) {
+            case (ast::item_tag(?id, ?variants, ?tps, _, ?did, _)) {
                 add_to_index(ebml_w, path, index, id);
                 ebml::start_tag(ebml_w, tag_paths_data_item);
                 encode_name(ebml_w, id);
@@ -435,7 +435,7 @@ fn encode_module_item_paths(&ebml::writer ebml_w,
 
                 encode_tag_variant_paths(ebml_w, variants, path, index);
             }
-            case (ast::item_obj(?id, _, ?tps, ?odid, ?ann)) {
+            case (ast::item_obj(?id, _, ?tps, _, ?odid, ?ann)) {
                 add_to_index(ebml_w, path, index, id);
                 ebml::start_tag(ebml_w, tag_paths_data_item);
                 encode_name(ebml_w, id);
@@ -543,7 +543,7 @@ fn encode_tag_variant_info(&@trans::crate_ctxt cx, &ebml::writer ebml_w,
 fn encode_info_for_item(@trans::crate_ctxt cx, &ebml::writer ebml_w,
                         @ast::item item, &mutable vec[tup(int, uint)] index) {
     alt (item.node) {
-        case (ast::item_const(_, _, _, ?did, ?ann)) {
+        case (ast::item_const(_, _, _, _, ?did, ?ann)) {
             ebml::start_tag(ebml_w, tag_items_data_item);
             encode_def_id(ebml_w, did);
             encode_kind(ebml_w, 'c' as u8);
@@ -551,7 +551,7 @@ fn encode_info_for_item(@trans::crate_ctxt cx, &ebml::writer ebml_w,
             encode_symbol(cx, ebml_w, did);
             ebml::end_tag(ebml_w);
         }
-        case (ast::item_fn(_, _, ?tps, ?did, ?ann)) {
+        case (ast::item_fn(_, _, ?tps, _, ?did, ?ann)) {
             ebml::start_tag(ebml_w, tag_items_data_item);
             encode_def_id(ebml_w, did);
             encode_kind(ebml_w, 'f' as u8);
@@ -566,13 +566,13 @@ fn encode_info_for_item(@trans::crate_ctxt cx, &ebml::writer ebml_w,
             encode_kind(ebml_w, 'm' as u8);
             ebml::end_tag(ebml_w);
         }
-        case (ast::item_native_mod(?id, _, ?did)) {
+        case (ast::item_native_mod(?id, _, _, ?did)) {
             ebml::start_tag(ebml_w, tag_items_data_item);
             encode_def_id(ebml_w, did);
             encode_kind(ebml_w, 'n' as u8);
             ebml::end_tag(ebml_w);
         }
-        case (ast::item_ty(?id, _, ?tps, ?did, ?ann)) {
+        case (ast::item_ty(?id, _, ?tps, _, ?did, ?ann)) {
             ebml::start_tag(ebml_w, tag_items_data_item);
             encode_def_id(ebml_w, did);
             encode_kind(ebml_w, 'y' as u8);
@@ -580,7 +580,7 @@ fn encode_info_for_item(@trans::crate_ctxt cx, &ebml::writer ebml_w,
             encode_type(cx, ebml_w, trans::node_ann_type(cx, ann));
             ebml::end_tag(ebml_w);
         }
-        case (ast::item_tag(?id, ?variants, ?tps, ?did, ?ann)) {
+        case (ast::item_tag(?id, ?variants, ?tps, _, ?did, ?ann)) {
             ebml::start_tag(ebml_w, tag_items_data_item);
             encode_def_id(ebml_w, did);
             encode_kind(ebml_w, 't' as u8);
@@ -593,7 +593,7 @@ fn encode_info_for_item(@trans::crate_ctxt cx, &ebml::writer ebml_w,
 
             encode_tag_variant_info(cx, ebml_w, did, variants, index, tps);
         }
-        case (ast::item_obj(?id, _, ?tps, ?odid, ?ann)) {
+        case (ast::item_obj(?id, _, ?tps, _, ?odid, ?ann)) {
             ebml::start_tag(ebml_w, tag_items_data_item);
             encode_def_id(ebml_w, odid.ctor);
             encode_kind(ebml_w, 'o' as u8);
diff --git a/src/comp/middle/resolve.rs b/src/comp/middle/resolve.rs
index dae5c8d174a..5355bb6d499 100644
--- a/src/comp/middle/resolve.rs
+++ b/src/comp/middle/resolve.rs
@@ -166,7 +166,7 @@ fn map_crate(&@env e, &@ast::crate c) {
                                       =new_str_hash[import_state]()));
                 e.ast_map.insert(defid, i);
             }
-            case (ast::item_native_mod(_, ?nmd, ?defid)) {
+            case (ast::item_native_mod(_, ?nmd, _, ?defid)) {
                 e.mod_map.insert(defid._1, 
                                  @rec(m=none[ast::_mod], 
                                       index=index_nmod(nmd),
@@ -175,19 +175,19 @@ fn map_crate(&@env e, &@ast::crate c) {
                                       =new_str_hash[import_state]()));
                 e.ast_map.insert(defid, i);
             }
-            case (ast::item_const(_, _, _, ?defid, _)) {
+            case (ast::item_const(_, _, _, _, ?defid, _)) {
                 e.ast_map.insert(defid, i);
             }
-            case (ast::item_fn(_, _, _, ?defid, _)) { 
+            case (ast::item_fn(_, _, _, _, ?defid, _)) { 
                 e.ast_map.insert(defid, i);
             }
-            case (ast::item_ty(_, _, _, ?defid, _)) {
+            case (ast::item_ty(_, _, _, _, ?defid, _)) {
                 e.ast_map.insert(defid, i);
             }
-            case (ast::item_tag(_, _, _, ?defid, _)) {
+            case (ast::item_tag(_, _, _, _, ?defid, _)) {
                 e.ast_map.insert(defid, i);
             }
-            case (ast::item_obj(_, _, _, ?obj_def_ids, _)) { 
+            case (ast::item_obj(_, _, _, _, ?obj_def_ids, _)) { 
                 e.ast_map.insert(obj_def_ids.ty, i);
                 e.ast_map.insert(obj_def_ids.ctor, i);
             }
@@ -210,7 +210,7 @@ fn map_crate(&@env e, &@ast::crate c) {
                         case (ast::item_mod(_, _, _, ?defid)) {
                             ret e.mod_map.get(defid._1);
                         }
-                        case (ast::item_native_mod(_, _, ?defid)) {
+                        case (ast::item_native_mod(_, _, _, ?defid)) {
                             ret e.mod_map.get(defid._1);
                         }
                         case (_) {
@@ -512,10 +512,10 @@ fn lookup_in_scope(&env e, scopes sc, &span sp, &ident id, namespace ns)
             }
             case (scope_item(?it)) {
                 alt (it.node) {
-                    case (ast::item_obj(_, ?ob, ?ty_params, _, _)) {
+                    case (ast::item_obj(_, ?ob, ?ty_params, _, _, _)) {
                         ret lookup_in_obj(id, ob, ty_params, ns);
                     }
-                    case (ast::item_tag(_, _, ?ty_params, _, _)) {
+                    case (ast::item_tag(_, _, ?ty_params, _, _, _)) {
                         if (ns == ns_type) {
                             ret lookup_in_ty_params(id, ty_params);
                         }
@@ -523,10 +523,10 @@ fn lookup_in_scope(&env e, scopes sc, &span sp, &ident id, namespace ns)
                     case (ast::item_mod(_, _, _, ?defid)) {
                         ret lookup_in_local_mod(e, defid, sp, id, ns, inside);
                     }
-                    case (ast::item_native_mod(_, ?m, ?defid)) {
+                    case (ast::item_native_mod(_, ?m, _, ?defid)) {
                         ret lookup_in_local_native_mod(e, defid, sp, id, ns);
                     }
-                    case (ast::item_ty(_, _, ?ty_params, _, _)) {
+                    case (ast::item_ty(_, _, ?ty_params, _, _, _)) {
                         if (ns == ns_type) {
                             ret lookup_in_ty_params(id, ty_params);
                         }
@@ -673,7 +673,7 @@ fn lookup_in_block(&ident id, &ast::block_ b, namespace ns)
                     case (ast::decl_item(?it)) {
                         alt (it.node) {
                             case (ast::item_tag(?name, ?variants, _,
-                                               ?defid, _)) {
+                                                _, ?defid, _)) {
                                 if (ns == ns_type) {
                                     if (str::eq(name, id)) {
                                         ret some(ast::def_ty(defid));
@@ -705,25 +705,25 @@ fn lookup_in_block(&ident id, &ast::block_ b, namespace ns)
 
 fn found_def_item(&@ast::item i, namespace ns) -> option::t[def] {
     alt (i.node) {
-        case (ast::item_const(_, _, _, ?defid, _)) {
+        case (ast::item_const(_, _, _, _, ?defid, _)) {
             if (ns == ns_value) { ret some(ast::def_const(defid)); }
         }
-        case (ast::item_fn(_, _, _, ?defid, _)) {
+        case (ast::item_fn(_, _, _, _, ?defid, _)) {
             if (ns == ns_value) { ret some(ast::def_fn(defid)); }
         }
         case (ast::item_mod(_, _, _, ?defid)) {
             if (ns == ns_module) { ret some(ast::def_mod(defid)); }
         }
-        case (ast::item_native_mod(_, _, ?defid)) {
+        case (ast::item_native_mod(_, _, _, ?defid)) {
             if (ns == ns_module) { ret some(ast::def_native_mod(defid)); }
         }
-        case (ast::item_ty(_, _, _, ?defid, _)) {
+        case (ast::item_ty(_, _, _, _, ?defid, _)) {
             if (ns == ns_type) { ret some(ast::def_ty(defid)); }
         }
-        case (ast::item_tag(_, _, _, ?defid, _)) {
+        case (ast::item_tag(_, _, _, _, ?defid, _)) {
             if (ns == ns_type) { ret some(ast::def_ty(defid)); }
         }
-        case (ast::item_obj(_, _, _, ?odid, _)) {
+        case (ast::item_obj(_, _, _, _, ?odid, _)) {
             alt (ns) {
                 case (ns_value) { ret some(ast::def_obj(odid.ctor)); }
                 case (ns_type) { ret some(ast::def_obj(odid.ty)); }
@@ -906,7 +906,7 @@ fn lookup_in_mie(&env e, &mod_index_entry mie, namespace ns)
         }
         case (mie_tag_variant(?item, ?variant_idx)) {
             alt (item.node) {
-                case (ast::item_tag(_, ?variants, _, ?tid, _)) {
+                case (ast::item_tag(_, ?variants, _, _, ?tid, _)) {
                     if (ns == ns_value) {
                         auto vid = variants.(variant_idx).node.id;
                         ret some(ast::def_variant(tid, vid));
@@ -970,22 +970,22 @@ fn index_mod(&ast::_mod md) -> mod_index {
 
     for (@ast::item it in md.items) {
         alt (it.node) {
-            case (ast::item_const(?id, _, _, _, _)) {
+            case (ast::item_const(?id, _, _,  _, _, _)) {
                 add_to_index(index, id, mie_item(it));
             }
-            case (ast::item_fn(?id, _, _, _, _)) {
+            case (ast::item_fn(?id, _, _, _, _, _)) {
                 add_to_index(index, id, mie_item(it));
             }
             case (ast::item_mod(?id, _, _, _)) {
                 add_to_index(index, id, mie_item(it));
             }
-            case (ast::item_native_mod(?id, _, _)) {
+            case (ast::item_native_mod(?id, _, _, _)) {
                 add_to_index(index, id, mie_item(it));
             }
-            case (ast::item_ty(?id, _, _, _, _)) {
+            case (ast::item_ty(?id, _, _, _, _, _)) {
                 add_to_index(index, id, mie_item(it));
             }
-            case (ast::item_tag(?id, ?variants, _, _, _)) {
+            case (ast::item_tag(?id, ?variants, _, _, _, _)) {
                 add_to_index(index, id, mie_item(it));
                 let uint variant_idx = 0u;
                 for (ast::variant v in variants) {
@@ -994,7 +994,7 @@ fn index_mod(&ast::_mod md) -> mod_index {
                     variant_idx += 1u;
                 }
             }
-            case (ast::item_obj(?id, _, _, _, _)) {
+            case (ast::item_obj(?id, _, _, _, _, _)) {
                 add_to_index(index, id, mie_item(it));
             }
         }
@@ -1122,11 +1122,11 @@ fn mie_span(&mod_index_entry mie) -> span {
 fn check_item(@env e, &@ast::item i, &() x, &vt[()] v) {
     visit::visit_item(i, x, v);
     alt (i.node) {
-        case (ast::item_fn(_, ?f, ?ty_params, _, _)) {
+        case (ast::item_fn(_, ?f, ?ty_params, _, _,  _)) {
             check_fn(*e, i.span, f);
             ensure_unique(*e, i.span, ty_params, ident_id, "type parameter");
         }
-        case (ast::item_obj(_, ?ob, ?ty_params, _, _)) {
+        case (ast::item_obj(_, ?ob, ?ty_params, _, _, _)) {
             fn field_name(&ast::obj_field field) -> ident {
                 ret field.ident;
             }
@@ -1136,7 +1136,7 @@ fn check_item(@env e, &@ast::item i, &() x, &vt[()] v) {
             }
             ensure_unique(*e, i.span, ty_params, ident_id, "type parameter");
         }
-        case (ast::item_tag(_, _, ?ty_params, _, _)) {
+        case (ast::item_tag(_, _, ?ty_params, _, _, _)) {
             ensure_unique(*e, i.span, ty_params, ident_id, "type parameter");
         }
         case (_) {}
@@ -1177,28 +1177,29 @@ fn check_block(@env e, &ast::block b, &() x, &vt[()] v) {
                     }
                     case (ast::decl_item(?it)) {
                         alt (it.node) {
-                            case (ast::item_tag(?name, ?variants, _, _, _)) {
+                            case (ast::item_tag(?name, ?variants,
+                                                _, _, _, _)) {
                                 add_name(types, it.span, name);
                                 for (ast::variant v in variants) {
                                     add_name(values, v.span, v.node.name);
                                 }
                             }
-                            case (ast::item_const(?name, _, _, _, _)) {
+                            case (ast::item_const(?name, _, _, _, _, _)) {
                                 add_name(values, it.span, name);
                             }
-                            case (ast::item_fn(?name, _, _, _, _)) {
+                            case (ast::item_fn(?name, _, _, _, _, _)) {
                                 add_name(values, it.span, name);
                             }
                             case (ast::item_mod(?name, _, _, _)) {
                                 add_name(mods, it.span, name);
                             }
-                            case (ast::item_native_mod(?name, _, _)) {
+                            case (ast::item_native_mod(?name, _, _, _)) {
                                 add_name(mods, it.span, name);
                             }
-                            case (ast::item_ty(?name, _, _, _, _)) {
+                            case (ast::item_ty(?name, _, _, _, _, _)) {
                                 add_name(types, it.span, name);
                             }
-                            case (ast::item_obj(?name, _, _, _, _)) {
+                            case (ast::item_obj(?name, _, _, _, _, _)) {
                                 add_name(types, it.span, name);
                                 add_name(values, it.span, name);
                             }
diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs
index 25b4c869b32..efa74e4bca8 100644
--- a/src/comp/middle/trans.rs
+++ b/src/comp/middle/trans.rs
@@ -8153,13 +8153,13 @@ fn trans_const(&@crate_ctxt cx, @ast::expr e,
 
 fn trans_item(@local_ctxt cx, &ast::item item) {
     alt (item.node) {
-        case (ast::item_fn(?name, ?f, ?tps, ?fid, ?ann)) {
+        case (ast::item_fn(?name, ?f, ?tps, _, ?fid, ?ann)) {
             auto sub_cx = extend_path(cx, name);
             auto llfndecl = cx.ccx.item_ids.get(fid);
             trans_fn(sub_cx, item.span, f, llfndecl, none[ty_self_pair],
                      tps, ann);
         }
-        case (ast::item_obj(?name, ?ob, ?tps, ?oid, ?ann)) {
+        case (ast::item_obj(?name, ?ob, ?tps, _, ?oid, ?ann)) {
             auto sub_cx = @rec(obj_typarams=tps,
                                obj_fields=ob.fields with
                                *extend_path(cx, name));
@@ -8171,7 +8171,7 @@ fn trans_item(@local_ctxt cx, &ast::item item) {
                                with *cx);
             trans_mod(sub_cx, m);
         }
-        case (ast::item_tag(?name, ?variants, ?tps, ?tag_id, _)) {
+        case (ast::item_tag(?name, ?variants, ?tps, _, ?tag_id, _)) {
             auto sub_cx = extend_path(cx, name);
             auto i = 0;
             for (ast::variant variant in variants) {
@@ -8179,7 +8179,7 @@ fn trans_item(@local_ctxt cx, &ast::item item) {
                 i += 1;
             }
         }
-        case (ast::item_const(?name, _, ?expr, ?cid, ?ann)) {
+        case (ast::item_const(?name, _, ?expr, _, ?cid, ?ann)) {
             trans_const(cx.ccx, expr, cid, ann);
         }
         case (_) { /* fall through */ }
@@ -8486,8 +8486,8 @@ fn decl_native_fn_and_pair(&@crate_ctxt ccx,
 
 fn item_path(&@ast::item item) -> vec[str] {
     alt (item.node) {
-        case (ast::item_fn(?name, _, _, _, _)) { ret [name]; }
-        case (ast::item_obj(?name, _, _, _, _)) { ret [name]; }
+        case (ast::item_fn(?name, _, _, _, _, _)) { ret [name]; }
+        case (ast::item_obj(?name, _, _, _, _, _)) { ret [name]; }
         case (ast::item_mod(?name, _, _, _)) { ret [name]; }
         case (_) { ret []; }
     }
@@ -8512,7 +8512,7 @@ fn collect_item_1(@crate_ctxt ccx, &@ast::item i,
                   &vec[str] pt, &vt[vec[str]] v) {
     visit::visit_item(i, pt + item_path(i), v);
     alt (i.node) {
-        case (ast::item_const(?name, _, _, ?cid, ?ann)) {
+        case (ast::item_const(?name, _, _, _, ?cid, ?ann)) {
             auto typ = node_ann_type(ccx, ann);
             auto g = llvm::LLVMAddGlobal(ccx.llmod, type_of(ccx, i.span, typ),
                                         str::buf(ccx.names.next(name)));
@@ -8524,13 +8524,13 @@ fn collect_item_1(@crate_ctxt ccx, &@ast::item i,
         case (ast::item_mod(?name, ?m, _, ?mid)) {
             ccx.items.insert(mid, i);
         }
-        case (ast::item_native_mod(_, _, ?mid)) {
+        case (ast::item_native_mod(_, _, _, ?mid)) {
             ccx.items.insert(mid, i);
         }
-        case (ast::item_ty(_, _, _, ?did, _)) {
+        case (ast::item_ty(_, _, _, _, ?did, _)) {
             ccx.items.insert(did, i);
         }
-        case (ast::item_tag(?name, ?variants, ?tps, ?tag_id, _)) {
+        case (ast::item_tag(?name, ?variants, ?tps, _, ?tag_id, _)) {
             ccx.items.insert(tag_id, i);
         }
         case (_) {}
@@ -8542,13 +8542,13 @@ fn collect_item_2(&@crate_ctxt ccx, &@ast::item i,
     auto new_pt = pt + item_path(i);
     visit::visit_item(i, new_pt, v);
     alt (i.node) {
-        case (ast::item_fn(?name, ?f, ?tps, ?fid, ?ann)) {
+        case (ast::item_fn(?name, ?f, ?tps, _, ?fid, ?ann)) {
             ccx.items.insert(fid, i);
             if (!ccx.obj_methods.contains_key(fid)) {
                 decl_fn_and_pair(ccx, i.span, new_pt, "fn", tps, ann, fid);
             }
         }
-        case (ast::item_obj(?name, ?ob, ?tps, ?oid, ?ann)) {
+        case (ast::item_obj(?name, ?ob, ?tps, _, ?oid, ?ann)) {
             ccx.items.insert(oid.ctor, i);
             decl_fn_and_pair(ccx, i.span, new_pt,
                              "obj_ctor", tps, ann, oid.ctor);
@@ -8578,7 +8578,7 @@ fn collect_tag_ctor(@crate_ctxt ccx, &@ast::item i,
     visit::visit_item(i, new_pt, v);
 
     alt (i.node) {
-        case (ast::item_tag(_, ?variants, ?tps, _, _)) {
+        case (ast::item_tag(_, ?variants, ?tps, _, _, _)) {
             for (ast::variant variant in variants) {
                 if (vec::len[ast::variant_arg](variant.node.args) != 0u) {
                     decl_fn_and_pair(ccx, i.span,
@@ -8607,7 +8607,7 @@ fn trans_constant(@crate_ctxt ccx, &@ast::item it,
     visit::visit_item(it, new_pt, v);
 
     alt (it.node) {
-        case (ast::item_tag(?ident, ?variants, _, ?tag_id, _)) {
+        case (ast::item_tag(?ident, ?variants, _, _, ?tag_id, _)) {
             auto i = 0u;
             auto n_variants = vec::len[ast::variant](variants);
             while (i < n_variants) {
@@ -8630,7 +8630,7 @@ fn trans_constant(@crate_ctxt ccx, &@ast::item it,
             }
         }
 
-        case (ast::item_const(?name, _, ?expr, ?cid, ?ann)) {
+        case (ast::item_const(?name, _, ?expr, _, ?cid, ?ann)) {
             // FIXME: The whole expr-translation system needs cloning to deal
             // with consts.
             auto v = C_int(1);
diff --git a/src/comp/middle/tstate/pre_post_conditions.rs b/src/comp/middle/tstate/pre_post_conditions.rs
index b7281684015..2fd0a9105cf 100644
--- a/src/comp/middle/tstate/pre_post_conditions.rs
+++ b/src/comp/middle/tstate/pre_post_conditions.rs
@@ -101,7 +101,7 @@ fn find_pre_post_obj(&crate_ctxt ccx, _obj o) -> () {
 
 fn find_pre_post_item(&crate_ctxt ccx, &item i) -> () {
     alt (i.node) {
-        case (item_const(?id, ?t, ?e, ?di, ?a)) {
+        case (item_const(?id, ?t, ?e, _, ?di, ?a)) {
             // make a fake fcx
             auto fake_fcx = rec(enclosing=
                 rec(constrs=@new_def_hash[constraint](),
@@ -112,7 +112,7 @@ fn find_pre_post_item(&crate_ctxt ccx, &item i) -> () {
                                 ccx=ccx);
             find_pre_post_expr(fake_fcx, e);
         }
-        case (item_fn(?id, ?f, ?ps, ?di, ?a)) {
+        case (item_fn(?id, ?f, ?ps, _, ?di, ?a)) {
             assert (ccx.fm.contains_key(di));
             auto fcx = rec(enclosing=ccx.fm.get(di),
                            id=di, name=id, ccx=ccx);
@@ -121,16 +121,16 @@ fn find_pre_post_item(&crate_ctxt ccx, &item i) -> () {
         case (item_mod(?id, ?m, _, ?di)) {
             find_pre_post_mod(m);
         }
-        case (item_native_mod(?id, ?nm, ?di)) {
+        case (item_native_mod(?id, ?nm, _, ?di)) {
             find_pre_post_native_mod(nm);
         }
-        case (item_ty(_,_,_,_,_)) {
+        case (item_ty(_,_,_,_,_,_)) {
             ret;
         }
-        case (item_tag(_,_,_,_,_)) {
+        case (item_tag(_,_,_,_,_,_)) {
             ret;
         }
-        case (item_obj(?id, ?o, ?ps, ?di, ?a)) {
+        case (item_obj(?id, ?o, ?ps, _, ?di, ?a)) {
             find_pre_post_obj(ccx, o);
         }
     }
diff --git a/src/comp/middle/ty.rs b/src/comp/middle/ty.rs
index d2c306425da..3206fb96406 100644
--- a/src/comp/middle/ty.rs
+++ b/src/comp/middle/ty.rs
@@ -1627,21 +1627,21 @@ fn pat_ty(&ctxt cx, &@ast::pat pat) -> t {
 
 fn item_ann(&@ast::item it) -> ast::ann {
     alt (it.node) {
-        case (ast::item_const(_,_,_,_,?a)) { ret a; }
-        case (ast::item_fn(_,_,_,_,?a)) { ret a; }
+        case (ast::item_const(_,_,_,_,_,?a)) { ret a; }
+        case (ast::item_fn(_,_,_,_,_,?a)) { ret a; }
         case (ast::item_mod(_,_,_, _)) {
             log_err "a module was passed to item_ann(), " +
                 "but modules haven't annotations";
             fail;
         }
-        case (ast::item_native_mod(_,_,_)) {
+        case (ast::item_native_mod(_,_,_,_)) {
             log_err "a native module was passed to item_ann(), " +
                 "but native modules haven't annotations";
             fail;
         }
-        case (ast::item_ty(_,_,_,_,?a)) { ret a; }
-        case (ast::item_tag(_,_,_,_,?a)) { ret a; }
-        case (ast::item_obj(_,_,_,_,?a)) { ret a; }
+        case (ast::item_ty(_,_,_,_,_,?a)) { ret a; }
+        case (ast::item_tag(_,_,_,_,_,?a)) { ret a; }
+        case (ast::item_obj(_,_,_,_,_,?a)) { ret a; }
     }
 }
 
@@ -2720,7 +2720,7 @@ fn tag_variants(&ctxt cx, &ast::def_id id) -> vec[variant_info] {
     alt (cx.items.get(id)) {
         case (any_item_rust(?item)) {
             alt (item.node) {
-                case (ast::item_tag(_, ?variants, _, _, _)) {
+                case (ast::item_tag(_, ?variants, _,  _, _, _)) {
                     let vec[variant_info] result = [];
                     for (ast::variant variant in variants) {
                         auto ctor_ty = ann_to_monotype(cx, variant.node.ann);
diff --git a/src/comp/middle/typeck.rs b/src/comp/middle/typeck.rs
index 210cf3ba0b7..52a6fa6415b 100644
--- a/src/comp/middle/typeck.rs
+++ b/src/comp/middle/typeck.rs
@@ -593,26 +593,26 @@ mod collect {
 
         alt (it.node) {
 
-            case (ast::item_const(?ident, ?t, _, ?def_id, _)) {
+            case (ast::item_const(?ident, ?t, _, _, ?def_id, _)) {
                 auto typ = convert(t);
                 auto tpt = tup(0u, typ);
                 cx.tcx.tcache.insert(def_id, tpt);
                 ret tpt;
             }
 
-            case (ast::item_fn(?ident, ?fn_info, ?tps, ?def_id, _)) {
+            case (ast::item_fn(?ident, ?fn_info, ?tps, _, ?def_id, _)) {
                 auto f = bind ty_of_arg(cx, _);
                 ret ty_of_fn_decl(cx, convert, f, fn_info.decl, fn_info.proto,
                                   tps, some(def_id));
             }
 
-            case (ast::item_obj(?ident, ?obj_info, ?tps, ?odid, _)) {
+            case (ast::item_obj(?ident, ?obj_info, ?tps, _, ?odid, _)) {
                 auto t_obj = ty_of_obj(cx, ident, obj_info, tps);
                 cx.tcx.tcache.insert(odid.ty, t_obj);
                 ret t_obj;
             }
 
-            case (ast::item_ty(?ident, ?t, ?tps, ?def_id, _)) {
+            case (ast::item_ty(?ident, ?t, ?tps, _, ?def_id, _)) {
                 alt (cx.tcx.tcache.find(def_id)) {
                     case (some(?tpt)) {
                         ret tpt;
@@ -629,7 +629,7 @@ mod collect {
                 ret tpt;
             }
 
-            case (ast::item_tag(_, _, ?tps, ?def_id, _)) {
+            case (ast::item_tag(_, _, ?tps, _, ?def_id, _)) {
                 // Create a new generic polytype.
                 let vec[ty::t] subtys = [];
 
@@ -648,7 +648,7 @@ mod collect {
             }
 
             case (ast::item_mod(_, _, _, _)) { fail; }
-            case (ast::item_native_mod(_, _, _)) { fail; }
+            case (ast::item_native_mod(_, _, _, _)) { fail; }
         }
     }
 
@@ -729,13 +729,13 @@ mod collect {
 
     fn collect(ty::item_table id_to_ty_item, &@ast::item i) {
         alt (i.node) {
-            case (ast::item_ty(_, _, _, ?def_id, _)) {
+            case (ast::item_ty(_, _, _, _, ?def_id, _)) {
                 id_to_ty_item.insert(def_id, ty::any_item_rust(i));
             }
-            case (ast::item_tag(_, _, _, ?def_id, _)) {
+            case (ast::item_tag(_, _, _, _, ?def_id, _)) {
                 id_to_ty_item.insert(def_id, ty::any_item_rust(i));
             }
-            case (ast::item_obj(_, _, _, ?odid, _)) {
+            case (ast::item_obj(_, _, _, _, ?odid, _)) {
                 id_to_ty_item.insert(odid.ty, ty::any_item_rust(i));
             }
             case (_) { /* empty */ }
@@ -759,18 +759,19 @@ mod collect {
             case (ast::item_mod(_, _, _, _)) {
                 // ignore item_mod, it has no type.
             }
-            case (ast::item_native_mod(_, ?native_mod, _)) {
+            case (ast::item_native_mod(_, ?native_mod, _, _)) {
                 // Propagate the native ABI down to convert_native() below,
                 // but otherwise do nothing, as native modules have no types.
                 *abi = some[ast::native_abi](native_mod.abi);
             }
-            case (ast::item_tag(_, ?variants, ?ty_params, ?tag_id, ?ann)) {
+            case (ast::item_tag(_, ?variants, ?ty_params, _, ?tag_id, ?ann)) {
                 auto tpt = ty_of_item(cx, it);
                 write::ty_only(cx.tcx, ann.id, tpt._1);
 
                 get_tag_variant_types(cx, tag_id, variants, ty_params);
             }
-            case (ast::item_obj(?ident, ?object, ?ty_params, ?odid, ?ann)) {
+            case (ast::item_obj(?ident, ?object,
+                                ?ty_params, _, ?odid, ?ann)) {
                 // This calls ty_of_obj().
                 auto t_obj = ty_of_item(cx, it);
 
@@ -2511,13 +2512,13 @@ fn check_method(&@crate_ctxt ccx, &@ast::method method) {
 
 fn check_item(@crate_ctxt ccx, &@ast::item it) {
     alt (it.node) {
-        case (ast::item_const(_, _, ?e, _, ?a)) {
+        case (ast::item_const(_, _, ?e, _, _, ?a)) {
             check_const(ccx, it.span, e, a);
         }
-        case (ast::item_fn(_, ?f, _, _, ?a)) {
+        case (ast::item_fn(_, ?f, _, _, _, ?a)) {
             check_fn(ccx, f.decl, f.proto, f.body, a);
         }
-        case (ast::item_obj(_, ?ob, _, ?obj_def_ids, _)) {
+        case (ast::item_obj(_, ?ob, _, _, ?obj_def_ids, _)) {
             // We're entering an object, so gather up the info we need.
             let ast::def_id di = obj_def_ids.ty;
             vec::push[obj_info](ccx.obj_infos,
@@ -2541,7 +2542,7 @@ fn mk_fn_purity_table(&@ast::crate crate) -> @fn_purity_table {
 
     fn do_one(@fn_purity_table t, &@ast::item i) -> () {
         alt (i.node) {
-            case (ast::item_fn(_, ?f, _, ?d_id, _)) {
+            case (ast::item_fn(_, ?f, _, _, ?d_id, _)) {
                 t.insert(d_id, f.decl.purity);
             }
             case (_) {}
diff --git a/src/comp/middle/visit.rs b/src/comp/middle/visit.rs
index b8c10fabf91..0db114f0c98 100644
--- a/src/comp/middle/visit.rs
+++ b/src/comp/middle/visit.rs
@@ -104,17 +104,17 @@ fn visit_local[E](&@local loc, &E e, &vt[E] v) {
 
 fn visit_item[E](&@item i, &E e, &vt[E] v) {
     alt (i.node) {
-        case (item_const(_, ?t, ?ex, _, _)) {
+        case (item_const(_, ?t, ?ex, _, _, _)) {
             vt(v).visit_ty(t, e, v);
             vt(v).visit_expr(ex, e, v);
         }
-        case (item_fn(?nm, ?f, ?tp, ?d, ?a)) {
+        case (item_fn(?nm, ?f, ?tp, _, ?d, ?a)) {
             vt(v).visit_fn(f, tp, i.span, nm, d, a, e, v);
         }
         case (item_mod(_, ?m, _, _)) {
             vt(v).visit_mod(m, i.span, e, v);
         }
-        case (item_native_mod(_, ?nm, _)) {
+        case (item_native_mod(_, ?nm, _, _)) {
             for (@view_item vi in nm.view_items) {
                 vt(v).visit_view_item(vi, e, v);
             }
@@ -122,17 +122,17 @@ fn visit_item[E](&@item i, &E e, &vt[E] v) {
                 vt(v).visit_native_item(ni, e, v);
             }
         }
-        case (item_ty(_, ?t, _, _, _)) {
+        case (item_ty(_, ?t, _, _, _, _)) {
             vt(v).visit_ty(t, e, v);
         }
-        case (item_tag(_, ?variants, _, _, _)) {
+        case (item_tag(_, ?variants, _, _, _, _)) {
             for (variant vr in variants) {
                 for (variant_arg va in vr.node.args) {
                     vt(v).visit_ty(va.ty, e, v);
                 }
             }
         }
-        case (item_obj(_, ?ob, _, _, _)) {
+        case (item_obj(_, ?ob, _, _, _, _)) {
             for (obj_field f in ob.fields) {
                 vt(v).visit_ty(f.ty, e, v);
             }
diff --git a/src/comp/middle/walk.rs b/src/comp/middle/walk.rs
index a7cf0ade136..3ef1586d14f 100644
--- a/src/comp/middle/walk.rs
+++ b/src/comp/middle/walk.rs
@@ -114,30 +114,30 @@ fn walk_item(&ast_visitor v, @ast::item i) {
     if (!v.keep_going()) { ret; }
     v.visit_item_pre(i);
     alt (i.node) {
-        case (ast::item_const(_, ?t, ?e, _, _)) {
+        case (ast::item_const(_, ?t, ?e, _, _, _)) {
             walk_ty(v, t);
             walk_expr(v, e);
         }
-        case (ast::item_fn(?nm, ?f, _, ?d, ?a)) {
+        case (ast::item_fn(?nm, ?f, _, _, ?d, ?a)) {
             walk_fn(v, f, i.span, nm, d, a);
         }
         case (ast::item_mod(_, ?m, _, _)) {
             walk_mod(v, m);
         }
-        case (ast::item_native_mod(_, ?nm, _)) {
+        case (ast::item_native_mod(_, ?nm, _, _)) {
             walk_native_mod(v, nm);
         }
-        case (ast::item_ty(_, ?t, _, _, _)) {
+        case (ast::item_ty(_, ?t, _, _, _, _)) {
             walk_ty(v, t);
         }
-        case (ast::item_tag(_, ?variants, _, _, _)) {
+        case (ast::item_tag(_, ?variants, _, _, _, _)) {
             for (ast::variant vr in variants) {
                 for (ast::variant_arg va in vr.node.args) {
                     walk_ty(v, va.ty);
                 }
             }
         }
-        case (ast::item_obj(_, ?ob, _, _, _)) {
+        case (ast::item_obj(_, ?ob, _, _, _, _)) {
             for (ast::obj_field f in ob.fields) {
                 walk_ty(v, f.ty);
             }