Skip to content

Commit 301cfe1

Browse files
committed
rustc: Add all items to the item table during translation. lib-vec now compiles, but asserts and then segfaults.
1 parent b09e09c commit 301cfe1

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

src/comp/middle/trans.rs

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6087,14 +6087,29 @@ fn collect_item(&@crate_ctxt cx, @ast.item i) -> @crate_ctxt {
60876087
cx.consts.insert(cid, g);
60886088
}
60896089

6090+
case (ast.item_fn(_, _, _, ?did, _)) {
6091+
// handled below
6092+
}
6093+
60906094
case (ast.item_mod(?name, ?m, ?mid)) {
60916095
cx.items.insert(mid, i);
60926096
}
60936097

6098+
case (ast.item_native_mod(_, _, _)) {
6099+
// empty
6100+
}
6101+
6102+
case (ast.item_ty(_, _, _, ?did, _)) {
6103+
cx.items.insert(did, i);
6104+
}
6105+
60946106
case (ast.item_tag(?name, ?variants, ?tps, ?tag_id)) {
60956107
cx.items.insert(tag_id, i);
60966108
}
6097-
case (_) { /* fall through */ }
6109+
6110+
case (ast.item_obj(_, _, _, ?did, _)) {
6111+
// handled below
6112+
}
60986113
}
60996114
ret extend_path(cx, item_name(i));
61006115
}

0 commit comments

Comments
 (0)