We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cfaa0f4 commit 08b49a5Copy full SHA for 08b49a5
src/comp/middle/ty.rs
@@ -2702,8 +2702,13 @@ fn tag_variants(&ctxt cx, &ast::def_id id) -> vec[variant_info] {
2702
if (cx.sess.get_targ_crate_num() != id._0) {
2703
ret creader::get_tag_variants(cx, id);
2704
}
2705
- assert (cx.items.contains_key(id._1));
2706
- alt (cx.items.get(id._1)) {
+ auto item = alt (cx.items.find(id._1)) {
+ case (some(?i)) { i }
2707
+ case (none) {
2708
+ cx.sess.bug("expected to find cached node_item")
2709
+ }
2710
+ };
2711
+ alt (item) {
2712
case (ast_map::node_item(?item)) {
2713
alt (item.node) {
2714
case (ast::item_tag(?variants, _)) {
0 commit comments