Skip to content

Commit a0eb9c8

Browse files
committed
rustc: Don't try to write symbols into the metadata for nullary tags. Puts out burning tinderbox.
1 parent 6dc4523 commit a0eb9c8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/comp/middle/metadata.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,9 @@ fn encode_tag_variant_info(@trans.crate_ctxt cx, &ebml.writer ebml_w,
369369
encode_kind(ebml_w, 'v' as u8);
370370
encode_tag_id(ebml_w, did);
371371
encode_type(ebml_w, trans.node_ann_type(cx, variant.node.ann));
372-
encode_symbol(cx, ebml_w, variant.node.id);
372+
if (_vec.len[ast.variant_arg](variant.node.args) > 0u) {
373+
encode_symbol(cx, ebml_w, variant.node.id);
374+
}
373375
encode_discriminant(cx, ebml_w, variant.node.id);
374376
ebml.end_tag(ebml_w);
375377
}

0 commit comments

Comments
 (0)