aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPatrick Walton <[email protected]>2011-04-01 14:14:10 -0700
committerPatrick Walton <[email protected]>2011-04-01 14:14:10 -0700
commita0eb9c814b75e00679234eeb9a0949850bd7c7c7 (patch)
tree14a6d0e894a12a86b8d005b1e77ecff9617e0cb1 /src
parentrustc: Get tag variants from the crate metadata (diff)
downloadrust-a0eb9c814b75e00679234eeb9a0949850bd7c7c7.tar.xz
rust-a0eb9c814b75e00679234eeb9a0949850bd7c7c7.zip
rustc: Don't try to write symbols into the metadata for nullary tags. Puts out burning tinderbox.
Diffstat (limited to 'src')
-rw-r--r--src/comp/middle/metadata.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/comp/middle/metadata.rs b/src/comp/middle/metadata.rs
index 587db223..08a8f0ee 100644
--- a/src/comp/middle/metadata.rs
+++ b/src/comp/middle/metadata.rs
@@ -369,7 +369,9 @@ fn encode_tag_variant_info(@trans.crate_ctxt cx, &ebml.writer ebml_w,
encode_kind(ebml_w, 'v' as u8);
encode_tag_id(ebml_w, did);
encode_type(ebml_w, trans.node_ann_type(cx, variant.node.ann));
- encode_symbol(cx, ebml_w, variant.node.id);
+ if (_vec.len[ast.variant_arg](variant.node.args) > 0u) {
+ encode_symbol(cx, ebml_w, variant.node.id);
+ }
encode_discriminant(cx, ebml_w, variant.node.id);
ebml.end_tag(ebml_w);
}