aboutsummaryrefslogtreecommitdiff
path: root/src/comp/middle/metadata.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/metadata.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/metadata.rs')
-rw-r--r--src/comp/middle/metadata.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/comp/middle/metadata.rs b/src/comp/middle/metadata.rs
index 6a470e39..c42ed6db 100644
--- a/src/comp/middle/metadata.rs
+++ b/src/comp/middle/metadata.rs
@@ -262,7 +262,7 @@ fn encode_module_item_paths(&ebml.writer ebml_w,
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);
@@ -403,11 +403,12 @@ fn encode_info_for_item(@trans.crate_ctxt cx, &ebml.writer ebml_w,
encode_type(ebml_w, trans.node_ann_type(cx, ann));
ebml.end_tag(ebml_w);
}
- case (ast.item_tag(?id, ?variants, ?tps, ?did)) {
+ 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);
encode_type_params(ebml_w, tps);
+ encode_type(ebml_w, trans.node_ann_type(cx, ann));
ebml.end_tag(ebml_w);
encode_tag_variant_info(cx, ebml_w, did, variants);