Skip to content

Commit 9bc211f

Browse files
committed
---
yaml --- r: 3351 b: refs/heads/master c: 08b49a5 h: refs/heads/master i: 3349: d81c3c7 3347: f54d358 3343: 8dd8077 v: v3
1 parent 0ad1cd5 commit 9bc211f

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: cfaa0f4b91b27abfb3b4fba4d0bb31a5e3da7c89
2+
refs/heads/master: 08b49a5d8fe975bcd8a0526526eb9692f3f3be4c

trunk/src/comp/middle/ty.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2702,8 +2702,13 @@ fn tag_variants(&ctxt cx, &ast::def_id id) -> vec[variant_info] {
27022702
if (cx.sess.get_targ_crate_num() != id._0) {
27032703
ret creader::get_tag_variants(cx, id);
27042704
}
2705-
assert (cx.items.contains_key(id._1));
2706-
alt (cx.items.get(id._1)) {
2705+
auto item = alt (cx.items.find(id._1)) {
2706+
case (some(?i)) { i }
2707+
case (none) {
2708+
cx.sess.bug("expected to find cached node_item")
2709+
}
2710+
};
2711+
alt (item) {
27072712
case (ast_map::node_item(?item)) {
27082713
alt (item.node) {
27092714
case (ast::item_tag(?variants, _)) {

0 commit comments

Comments
 (0)